"use strict";function _defineProperties(o,r){for(var t=0;te?Math.pow(i,3):(116*i-16)/n,r=8e?Math.pow(o,3):(116*o-16)/n;return[i*Color.d65[0]+0,r*Color.d65[1]+0,n*Color.d65[2]+0]},Color.labToLCHab=function labToLCHab(o){var r=o[1],t=Math.abs(o[2])>>24,r^=e)}return Math.abs(r)}var r=Jb(o=void 0===o?"":o),t=Jb(o+r);return new Color({color:[r%256,t%256,Jb(o+t)%256]})},Color.randomOfType=function randomOfType(o){if("string"!=typeof(o=void 0===o?"rgb":o))throw new TypeError("Parameter 1 must be of type string.");if(o=o.toLowerCase(),!Color.validTypes.includes(o))throw new TypeError("Parameter 1 '"+o+"' is not a valid type.");return Color.random()[o]},Color.randomOfTypeFormatted=function randomOfTypeFormatted(o,r,t){if(void 0===r&&(r=!0),void 0===t&&(t=3),"string"!=typeof(o=void 0===o?"rgb":o))throw new TypeError("Parameter 1 must be of type string.");if(o=o.toLowerCase(),!Color.validTypes.includes(o))throw new TypeError("Parameter 1 '"+o+"' is not a valid type.");var e=Color.random();return e.capitalize=r,e.precision=t,e[o+"String"]},Color.contrastTextColor=function contrastTextColor(o,r){if("string"!=typeof(r=void 0===r?"rgb":r))throw new TypeError("Parameter 2 must be of type string.");if(r=r.toLowerCase(),!Color.validTypes.includes(r))throw new TypeError("Parameter 2 '"+r+"' is not a valid type.");var t=Color.contrastRatio(new Color({color:[255,255,255]}),new Color({color:o,type:r}));return Color.contrastRatio(new Color({color:[0,0,0]}),new Color({color:o,type:r}))