Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colortranslator

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colortranslator - npm Package Compare versions

Comparing version 3.0.2 to 4.0.0

131

esm/index.d.ts
type NumberOrString = number | string;
interface HEXObject {
r: string;
g: string;
b: string;
a?: string;
R: string;
G: string;
B: string;
A?: string;
}
interface RGBObject {
r: number;
g: number;
b: number;
a?: number;
R: number;
G: number;
B: number;
A?: number;
}
interface RGBObjectGeneric {
r: NumberOrString;
g: NumberOrString;
b: NumberOrString;
a?: NumberOrString;
R: NumberOrString;
G: NumberOrString;
B: NumberOrString;
A?: NumberOrString;
}
interface HSLObject {
h: number;
s: number;
l: number;
a?: number;
H: number;
S: number;
L: number;
A?: number;
}
interface HSLObjectGeneric {
h: number;
s: NumberOrString;
l: NumberOrString;
a?: number;
H: number;
S: NumberOrString;
L: NumberOrString;
A?: NumberOrString;
}
interface CIELabObject {
L: number;
a: number;
b: number;
A?: number;
}
interface CIELabObjectGeneric {
L: NumberOrString;
a: NumberOrString;
b: NumberOrString;
A?: NumberOrString;
}
interface CMYKObject {
c: number;
m: number;
y: number;
k: number;
a?: number;
C: number;
M: number;
Y: number;
K: number;
A?: number;
}
interface CMYKObjectGeneric {
c: NumberOrString;
m: NumberOrString;
y: NumberOrString;
k: NumberOrString;
a?: number;
C: NumberOrString;
M: NumberOrString;
Y: NumberOrString;
K: NumberOrString;
A?: NumberOrString;
}
type Color = RGBObjectGeneric | HSLObjectGeneric | CMYKObjectGeneric;
type Color = RGBObjectGeneric | HSLObjectGeneric | CMYKObjectGeneric | CIELabObjectGeneric;
type ColorInput = string | Color;

@@ -69,2 +81,3 @@ declare enum AnglesUnitEnum {

rgbUnit: ColorUnitEnum;
labUnit: ColorUnitEnum;
cmykUnit: ColorUnitEnum;

@@ -74,6 +87,7 @@ alphaUnit: ColorUnitEnum;

}
type InputOptions = Partial<Omit<Options, "anglesUnit" | "rgbUnit" | "cmykUnit" | "alphaUnit" | "cmykFunction">> & {
type InputOptions = Partial<Omit<Options, "anglesUnit" | "rgbUnit" | "labUnit" | "cmykUnit" | "alphaUnit" | "cmykFunction">> & {
anglesUnit?: `${AnglesUnitEnum}`;
rgbUnit?: `${ColorUnitEnum}`;
cmykUnit?: `${ColorUnitEnum}`;
labUnit?: `${ColorUnitEnum}`;
alphaUnit?: `${ColorUnitEnum}`;

@@ -99,22 +113,25 @@ cmykFunction?: `${CMYKFunctionEnum}`;

private hsl;
private lab;
private cmyk;
private updateRGB;
private updateRGBFromCMYK;
private updateRGBFromLab;
private updateHSL;
private updateLab;
private updateCMYK;
private updateRGBAndCMYK;
private updateHSLAndCMYK;
private updateRGBAndHSL;
setOptions(options?: InputOptions): ColorTranslator;
setH(h: number): ColorTranslator;
setS(s: number): ColorTranslator;
setL(l: number): ColorTranslator;
setR(r: number): ColorTranslator;
setG(g: number): ColorTranslator;
setB(b: number): ColorTranslator;
setA(a: number): ColorTranslator;
setC(c: number): ColorTranslator;
setM(m: number): ColorTranslator;
setY(y: number): ColorTranslator;
setK(k: number): ColorTranslator;
setH(H: number): ColorTranslator;
setS(S: number): ColorTranslator;
setL(L: number): ColorTranslator;
setR(R: number): ColorTranslator;
setG(G: number): ColorTranslator;
setB(B: number): ColorTranslator;
setCIEL(L: number): ColorTranslator;
setCIEa(a: number): ColorTranslator;
setCIEb(b: number): ColorTranslator;
setA(A: number): ColorTranslator;
setC(C: number): ColorTranslator;
setM(M: number): ColorTranslator;
setY(Y: number): ColorTranslator;
setK(K: number): ColorTranslator;
get options(): Options;

@@ -124,2 +141,5 @@ get H(): number;

get L(): number;
get CIEL(): number;
get CIEa(): number;
get CIEb(): number;
get R(): number;

@@ -139,2 +159,4 @@ get G(): number;

get HSLAObject(): HSLObject;
get CIELabObject(): CIELabObject;
get CIELabAObject(): CIELabObject;
get CMYKObject(): CMYKObject;

@@ -148,2 +170,4 @@ get CMYKAObject(): CMYKObject;

get HSLA(): string;
get CIELab(): string;
get CIELabA(): string;
get CMYK(): string;

@@ -163,2 +187,6 @@ get CMYKA(): string;

static toHSLA(color: ColorInput, options?: InputOptions): string;
static toCIELabObject(color: ColorInput, options?: InputOptions): CIELabObject;
static toCIELab(color: ColorInput, options?: InputOptions): string;
static toCIELabAObject(color: ColorInput, options?: InputOptions): CIELabObject;
static toCIELabA(color: ColorInput, options?: InputOptions): string;
static toCMYKObject(color: ColorInput, options?: InputOptions): CMYKObject;

@@ -180,2 +208,6 @@ static toCMYK(color: ColorInput, options?: InputOptions): string;

static getBlendHSLA(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): string[];
static getBlendCIELabObject(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): CIELabObject[];
static getBlendCIELab(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): string[];
static getBlendCIELabAObject(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): CIELabObject[];
static getBlendCIELabA(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): string[];
static getMixHEXObject(colors: ColorInput[], mode?: Mix): HEXObject;

@@ -193,2 +225,6 @@ static getMixHEX(colors: ColorInput[], mode?: Mix): string;

static getMixHSLA(colors: ColorInput[], mode?: Mix, options?: InputOptions): string;
static getMixCIELabObject(colors: ColorInput[], mode?: Mix, options?: InputOptions): CIELabObject;
static getMixCIELab(colors: ColorInput[], mode?: Mix, options?: InputOptions): string;
static getMixCIELabAObject(colors: ColorInput[], mode?: Mix, options?: InputOptions): CIELabObject;
static getMixCIELabA(colors: ColorInput[], mode?: Mix, options?: InputOptions): string;
static getShades(color: string, shades: number, options?: InputOptions): string[];

@@ -198,2 +234,3 @@ static getShades(color: HEXObject, shades: number, options?: InputOptions): HEXObject[];

static getShades(color: HSLObjectGeneric, shades: number, options?: InputOptions): HSLObject[];
static getShades(color: CIELabObjectGeneric, shades: number, options?: InputOptions): CIELabObject[];
static getTints(color: string, tints: number, options?: InputOptions): string[];

@@ -203,2 +240,3 @@ static getTints(color: HEXObject, tints: number, options?: InputOptions): HEXObject[];

static getTints(color: HSLObjectGeneric, tints: number, options?: InputOptions): HSLObject[];
static getTints(color: CIELabObjectGeneric, tints: number, options?: InputOptions): CIELabObject[];
static getHarmony(color: string, harmony?: Harmony, mode?: Mix, options?: InputOptions): string[];

@@ -208,3 +246,4 @@ static getHarmony(color: HEXObject, harmony?: Harmony, mode?: Mix, options?: InputOptions): HEXObject[];

static getHarmony(color: HSLObjectGeneric, harmony?: Harmony, mode?: Mix, options?: InputOptions): HSLObject[];
static getHarmony(color: CIELabObjectGeneric, harmony?: Harmony, mode?: Mix, options?: InputOptions): CIELabObject[];
}
export { ColorTranslator, InputOptions, Harmony, Mix, HEXObject, RGBObject, HSLObject, CMYKObject };

@@ -1,1 +0,1 @@

var t=function(){return t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},t.apply(this,arguments)};function e(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var n,r,i,o;!function(t){t.HEX="HEX",t.RGB="RGB",t.HSL="HSL",t.CMYK="CMYK"}(n||(n={})),function(t){t.ANALOGOUS="ANALOGOUS",t.COMPLEMENTARY="COMPLEMENTARY",t.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",t.TRIADIC="TRIADIC",t.TETRADIC="TETRADIC",t.SQUARE="SQUARE"}(r||(r={})),function(t){t.ADDITIVE="ADDITIVE",t.SUBTRACTIVE="SUBTRACTIVE"}(i||(i={})),function(t){t.black="#000000",t.silver="#C0C0C0",t.gray="#808080",t.white="#FFFFFF",t.maroon="#800000",t.red="#FF0000",t.purple="#800080",t.fuchsia="#FF00FF",t.green="#008000",t.lime="#00FF00",t.olive="#808000",t.yellow="#FFFF00",t.navy="#000080",t.blue="#0000FF",t.teal="#008080",t.aqua="#00FFFF",t.orange="#FFA500",t.aliceblue="#F0F8FF",t.antiquewhite="#FAEBD7",t.aquamarine="#7FFFD4",t.azure="#F0FFFF",t.beige="#F5F5DC",t.bisque="#FFE4C4",t.blanchedalmond="#FFEBCD",t.blueviolet="#8A2BE2",t.brown="#A52A2A",t.burlywood="#DEB887",t.cadetblue="#5F9EA0",t.chartreuse="#7FFF00",t.chocolate="#D2691E",t.coral="#FF7F50",t.cornflowerblue="#6495ED",t.cornsilk="#FFF8DC",t.crimson="#DC143C",t.cyan="#00FFFF",t.darkblue="#00008B",t.darkcyan="#008B8B",t.darkgoldenrod="#B8860B",t.darkgray="#A9A9A9",t.darkgreen="#006400",t.darkgrey="#A9A9A9",t.darkkhaki="#BDB76B",t.darkmagenta="#8B008B",t.darkolivegreen="#556B2F",t.darkorange="#FF8C00",t.darkorchid="#9932CC",t.darkred="#8B0000",t.darksalmon="#E9967A",t.darkseagreen="#8FBC8F",t.darkslateblue="#483D8B",t.darkslategray="#2F4F4F",t.darkslategrey="#2F4F4F",t.darkturquoise="#00CED1",t.darkviolet="#9400D3",t.deeppink="#FF1493",t.deepskyblue="#00BFFF",t.dimgray="#696969",t.dimgrey="#696969",t.dodgerblue="#1E90FF",t.firebrick="#B22222",t.floralwhite="#FFFAF0",t.forestgreen="#228B22",t.gainsboro="#DCDCDC",t.ghostwhite="#F8F8FF",t.gold="#FFD700",t.goldenrod="#DAA520",t.greenyellow="#ADFF2F",t.grey="#808080",t.honeydew="#F0FFF0",t.hotpink="#FF69B4",t.indianred="#CD5C5C",t.indigo="#4B0082",t.ivory="#FFFFF0",t.khaki="#F0E68C",t.lavender="#E6E6FA",t.lavenderblush="#FFF0F5",t.lawngreen="#7CFC00",t.lemonchiffon="#FFFACD",t.lightblue="#ADD8E6",t.lightcoral="#F08080",t.lightcyan="#E0FFFF",t.lightgoldenrodyellow="#FAFAD2",t.lightgray="#D3D3D3",t.lightgreen="#90EE90",t.lightgrey="#D3D3D3",t.lightpink="#FFB6C1",t.lightsalmon="#FFA07A",t.lightseagreen="#20B2AA",t.lightskyblue="#87CEFA",t.lightslategray="#778899",t.lightslategrey="#778899",t.lightsteelblue="#B0C4DE",t.lightyellow="#FFFFE0",t.limegreen="#32CD32",t.linen="#FAF0E6",t.magenta="#FF00FF",t.mediumaquamarine="#66CDAA",t.mediumblue="#0000CD",t.mediumorchid="#BA55D3",t.mediumpurple="#9370DB",t.mediumseagreen="#3CB371",t.mediumslateblue="#7B68EE",t.mediumspringgreen="#00FA9A",t.mediumturquoise="#48D1CC",t.mediumvioletred="#C71585",t.midnightblue="#191970",t.mintcream="#F5FFFA",t.mistyrose="#FFE4E1",t.moccasin="#FFE4B5",t.navajowhite="#FFDEAD",t.oldlace="#FDF5E6",t.olivedrab="#6B8E23",t.orangered="#FF4500",t.orchid="#DA70D6",t.palegoldenrod="#EEE8AA",t.palegreen="#98FB98",t.paleturquoise="#AFEEEE",t.palevioletred="#DB7093",t.papayawhip="#FFEFD5",t.peachpuff="#FFDAB9",t.peru="#CD853F",t.pink="#FFC0CB",t.plum="#DDA0DD",t.powderblue="#B0E0E6",t.rosybrown="#BC8F8F",t.royalblue="#4169E1",t.saddlebrown="#8B4513",t.salmon="#FA8072",t.sandybrown="#F4A460",t.seagreen="#2E8B57",t.seashell="#FFF5EE",t.sienna="#A0522D",t.skyblue="#87CEEB",t.slateblue="#6A5ACD",t.slategray="#708090",t.slategrey="#708090",t.snow="#FFFAFA",t.springgreen="#00FF7F",t.steelblue="#4682B4",t.tan="#D2B48C",t.thistle="#D8BFD8",t.tomato="#FF6347",t.turquoise="#40E0D0",t.violet="#EE82EE",t.wheat="#F5DEB3",t.whitesmoke="#F5F5F5",t.yellowgreen="#9ACD32",t.rebeccapurple="#663399"}(o||(o={}));var a,c,u=Object.keys(o),s={HEX:["r","g","b","a"],RGB:["r","g","b","a"],HSL:["h","s","l","a"],CMYK:["c","m","y","k","a"]},d={BGR:n.RGB,ABGR:n.RGB,HLS:n.HSL,AHLS:n.HSL,CKMY:n.CMYK,ACKMY:n.CMYK};!function(t){t.NUMBER="number",t.BOOLEAN="boolean"}(a||(a={}));var l,f,h,p=((c={})[n.HEX]=/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,c[n.RGB]=/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[n.HSL]=/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[n.CMYK]=/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c),g=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,m=/^(\d+(?:\.\d+)?|\.\d+)%$/,b=/^0x([a-f\d]{1,2})$/i,A=/\{(\d+)\}/g,y=/,( +|\d+)/g,E=/ +/,F="The provided string color doesn't have a correct format",v="The provided color object doesn't have the proper keys or format";!function(t){t.NONE="none",t.DEGREES="deg",t.GRADIANS="grad",t.RADIANS="rad",t.TURNS="turn"}(l||(l={})),function(t){t.NONE="none",t.PERCENT="percent"}(f||(f={})),function(t){t.DEVICE_CMYK="device-cmyk",t.CMYK="cmyk"}(h||(h={}));var H,B,C,S,R,M,D={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:l.NONE,rgbUnit:f.NONE,cmykUnit:f.PERCENT,alphaUnit:f.NONE,cmykFunction:h.DEVICE_CMYK},O=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},L=function(t){return+"".concat(t).replace(m,"$1")},G=function(t){return m.test("".concat(t))?L(t):Math.min(+t,100)},k=function(t){return 1===t.length&&(t+=t),parseInt(t,16)},j=function(t){var e=K(t,0).toString(16).toUpperCase();return 1===e.length?"0x0".concat(e):"0x".concat(e)},X=function(t,e){return void 0===e&&(e=!1),!e&&m.test(t)?Math.min(255*L(t)/100,255):b.test(t)?(3===t.length&&(t+=t.slice(-1)),e?K(t)/255:K(t)):Math.min(+t,e?1:255)},I=function(t){return Math.min(m.test(t)?L(t)/100:+t,1)},Y=function(t){return e([],t,!0).sort().join("").toUpperCase()},K=function(t,e){void 0===e&&(e=6);var n=Math.pow(10,e);return Math.round(+t*n)/n},N=function(t,e,n){return Math.max(e,Math.min(t,n))},T=function(t){if("string"==typeof t){var e=t.match(g),n=+e[1];switch(e[2]){case l.RADIANS:t=K(180*n/Math.PI);break;case l.TURNS:t=K(360*n);break;case l.GRADIANS:t=K(.9*n);break;case l.DEGREES:default:t=n}}return(t>360||t<0)&&(t-=360*Math.floor(t/360)),t},P=function(t,e){var n;switch(e){case l.RADIANS:n=K(function(t){return t*Math.PI/180}(t));break;case l.TURNS:n=K(t/360);break;case l.GRADIANS:n=K(10/9*t);break;case l.DEGREES:case l.NONE:default:n=t}return n},U=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=[],i=[],o=[],c=[],u=[],s=Object.values(l),d=Object.values(f),b=Object.values(h),A={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0},F=0,v=e;F<v.length;F++){var H=v[F];if("string"==typeof H){if(r.push(H),H.includes(",")){A.legacyCSS++;var B=H.match(y);1===new Set(B).size&&E.test(B[0].slice(1))&&A.spacesAfterCommas++}if(H.match(p.HSL)){var C=(k=H.match(p.HSL))[1]||k[5],S=k[8],R=C.match(g)[2];i.push(""===R?l.NONE:R),u.push(m.test(S));continue}if(p.RGB.test(H)){var M=(k=H.match(p.RGB))[1]||k[5],O=k[2]||k[6],L=k[3]||k[7],G=k[8];o.push(m.test(M)&&m.test(O)&&m.test(L)),u.push(m.test(G));continue}if(H.match(p.CMYK)){var k,j=(k=H.match(p.CMYK))[1]||k[6],X=k[2]||k[7],I=k[3]||k[8],Y=k[4]||k[9];G=k[10];c.push(m.test(j)&&m.test(X)&&m.test(I)&&m.test(Y)),H.startsWith("cmyk")&&A.cmykFunction++,u.push(m.test(G))}}}return{decimals:typeof t.decimals===a.NUMBER?t.decimals:D.decimals,legacyCSS:typeof t.legacyCSS===a.BOOLEAN?t.legacyCSS:Boolean(r.length&&A.legacyCSS===r.length)||D.legacyCSS,spacesAfterCommas:typeof t.spacesAfterCommas===a.BOOLEAN?t.spacesAfterCommas:Boolean(r.length&&A.spacesAfterCommas===r.length)||D.spacesAfterCommas,anglesUnit:t.anglesUnit&&s.includes(t.anglesUnit)?t.anglesUnit:1===new Set(i).size?i[0]:D.anglesUnit,rgbUnit:t.rgbUnit&&d.includes(t.rgbUnit)?t.rgbUnit:1===new Set(o).size&&o[0]?f.PERCENT:D.rgbUnit,cmykUnit:t.cmykUnit&&d.includes(t.cmykUnit)?t.cmykUnit:1!==new Set(c).size||c[0]?D.cmykUnit:f.NONE,alphaUnit:t.alphaUnit&&d.includes(t.alphaUnit)?t.alphaUnit:1===new Set(u).size&&u[0]?f.PERCENT:D.alphaUnit,cmykFunction:t.cmykFunction&&b.includes(t.cmykFunction)?t.cmykFunction:c.length&&c.length===A.cmykFunction?h.CMYK:D.cmykFunction}},w=function(t,e,n){return n<0&&(n+=6),n>=6&&(n-=6),K(n<1?255*((e-t)*n+t):n<3?255*e:n<4?255*((e-t)*(4-n)+t):255*t)},x=function(t,e,n){e/=100;var r=(n/=100)<=.5?n*(e+1):n+e-n*e,i=2*n-r;return{r:w(i,r,(t/=60)+2),g:w(i,r,t),b:w(i,r,t-2)}},V=function(t,e,n,r){return{r:K(255*(1-t)*(r=1-r)),g:K(255*(1-e)*r),b:K(255*(1-n)*r)}},q=function(t,e,n){t/=255,e/=255,n/=255;var r=1-Math.max(t,e,n),i=1-r,o=i&&(i-e)/i,a=i&&(i-n)/i;return{c:K(100*(i&&(i-t)/i)),m:K(100*o),y:K(100*a),k:K(100*r)}},_=function(t,e,n,r){void 0===r&&(r=1),t/=255,e/=255,n/=255,r=Math.min(r,1);var i=Math.max(t,e,n),o=Math.min(t,e,n),a=i-o,c=0,u=0,s=(i+o)/2;if(0!==a){switch(i){case t:c=(e-n)/a%6;break;case e:c=(n-t)/a+2;break;case n:c=(t-e)/a+4}(c=K(60*c))<0&&(c+=360),u=a/(1-Math.abs(2*s-1))}return{h:c,s:K(100*u),l:K(100*s),a:r}},$=function(t,e){if(t<0&&(t+=360),t>360&&(t-=360),360===t||0===t)return t;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=e?r:n,o=0,a=0,c=0,u=0;return(e?n:r).find((function(e,n){return t>=e[0]&&t<e[1]&&(o=e[0],a=e[1],c=i[n][0],u=i[n][1],!0)})),c+(u-c)/(a-o)*(t-o)},z=function(t){return t?", ":","},Q=function(t,e){var n=Y(Object.keys(t));return s[d[n]].reduce((function(n,r,i){var o=t[r];return void 0!==o&&n.push(e(o,i)),n}),[])},W=function(t,e){return t.replace(A,(function(t,n){return"".concat(e[+n-1])}))},J=function(t,e){var n=e.alphaUnit,r=e.legacyCSS,i=e.decimals;return n!==f.PERCENT||r?K(t,i):"".concat(K(100*t,i),"%")},Z=((H={})[n.HEX]=function(t){var e=Q(t,(function(t){return e=K(t),1===(n=K(e,0).toString(16).toUpperCase()).length&&(n="0".concat(n)),n;var e,n})),n=4===e.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return W(n,e)},H[n.RGB]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.rgbUnit,a=z(i),c=Q(t,(function(t,r){return o===f.PERCENT&&r<3?"".concat(function(t,e){return K(t/255*100,e)}(t,n),"%"):3===r?J(t,e):K(t,n)})),u=r?4===c.length?"rgba({1}".concat(a,"{2}").concat(a,"{3}").concat(a,"{4})"):"rgb({1}".concat(a,"{2}").concat(a,"{3})"):4===c.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return W(u,c)},H[n.HSL]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.anglesUnit,a=z(i),c=Q(t,(function(t,r){if(0===r&&o!==l.NONE){var i=K(P(t,o),n);return"".concat(i).concat(o)}return 3===r?J(t,e):K(t,n)})),u=r?4===c.length?"hsla({1}".concat(a,"{2}%").concat(a,"{3}%").concat(a,"{4})"):"hsl({1}".concat(a,"{2}%").concat(a,"{3}%)"):4===c.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return W(u,c)},H[n.CMYK]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.cmykUnit,a=e.cmykFunction,c=z(i),u=Q(t,(function(t,r){return o===f.PERCENT&&r<4?"".concat(K(t,n),"%"):4===r?J(t,e):K(t/100,n)})),s=r?5===u.length?"".concat(a,"({1}").concat(c,"{2}").concat(c,"{3}").concat(c,"{4}").concat(c,"{5})"):"".concat(a,"({1}").concat(c,"{2}").concat(c,"{3}").concat(c,"{4})"):5===u.length?"".concat(a,"({1} {2} {3} {4} / {5})"):"".concat(a,"({1} {2} {3} {4})");return W(s,u)},H),tt=function(t){return"string"==typeof t&&(t=m.test(t)?L(t)/100:+t),isNaN(+t)||t>1?1:K(t)},et=function(n,r,o){return r.reduce((function(r,a){return e(e([],r,!0),[t(t({},n),{h:o===i.ADDITIVE?T(n.h+a):T($($(n.h,!1)+a,!0))})],!1)}),[t({},n)])},nt=function(t,e){return et(t,[30,-30],e)},rt=function(t,e){return et(t,[180],e)},it=function(t,e){return et(t,[150,-150],e)},ot=function(t,e){return et(t,[120,-120],e)},at=function(t,e){return et(t,[60,-120,180],e)},ct=function(t,e){return et(t,[90,-90,180],e)},ut=function(t){return"string"==typeof t?function(t){var e;if(Object.keys(n).some((function(n){if(p[n].test(t))return e=n,!0})),!e&&~u.indexOf(t)&&(e=n.HEX),!e)throw new Error(F);return e}(t):function(t){var e,r=!1,i=Y(Object.keys(t));if(d[i]&&(e=d[i]),e&&e===n.RGB){var o=Object.entries(t).some((function(t){return!b.test("".concat(t[1]))})),a=Object.entries(t).some((function(t){return!(m.test("".concat(t[1]))||!b.test("".concat(t[1]))&&!isNaN(+t[1])&&+t[1]<=255)}));o&&a&&(r=!0),o||(e=n.HEX)}if(!e||r)throw new Error(v);return e}(t)},st=((B={})[n.HEX]=function(t){var e=(~u.indexOf(t)?o[t]:t).match(p.HEX),n={r:k(e[1]||e[5]),g:k(e[2]||e[6]),b:k(e[3]||e[7])},r=e[4]||e[8];return void 0!==r&&(n.a=k(r)/255),n},B[n.RGB]=function(t){var e=t.match(p.RGB),n=X(e[1]||e[5]),r=X(e[2]||e[6]),i=X(e[3]||e[7]),o=e[4]||e[8],a={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return void 0!==o&&(a.a=tt(o)),a},B[n.HSL]=function(t){var e=t.match(p.HSL),n=T(e[1]||e[5]),r=G(e[2]||e[6]),i=G(e[3]||e[7]),o=e[4]||e[8],a=x(n,r,i);return void 0!==o&&(a.a=tt(o)),a},B[n.CMYK]=function(t){var e=t.match(p.CMYK),n=I(e[1]||e[6]),r=I(e[2]||e[7]),i=I(e[3]||e[8]),o=I(e[4]||e[9]),a=e[5]||e[10],c=V(n,r,i,o);return void 0!==a&&(c.a=tt(a)),c},B),dt=((C={})[n.HEX]=function(t){var e={r:X("".concat(t.r)),g:X("".concat(t.g)),b:X("".concat(t.b))};return O(t,"a")&&(e.a=Math.min(X("".concat(t.a),!0),1)),e},C[n.RGB]=function(t){return this.HEX(t)},C[n.HSL]=function(t){var e=G("".concat(t.s)),n=G("".concat(t.l)),r=x(T(t.h),e,n);return O(t,"a")&&(r.a=tt(t.a)),r},C[n.CMYK]=function(t){var e=I("".concat(t.c)),n=I("".concat(t.m)),r=I("".concat(t.y)),i=I("".concat(t.k)),o=V(e,n,r,i);return O(t,"a")&&(o.a=tt(t.a)),o},C),lt=function(t,e){return void 0===e&&(e=ut(t)),"string"==typeof t?st[e](t):dt[e](t)},ft=((S={})[n.HEX]=function(t){return{r:j(t.r),g:j(t.g),b:j(t.b)}},S.HEXA=function(t){var e=ft.HEX(t);return e.a=O(t,"a")?j(255*t.a):"0xFF",e},S[n.RGB]=function(t,e){var n=mt(t,e);return O(n,"a")&&delete n.a,n},S.RGBA=function(t,e){var n=ft.RGB(t,e);return n.a=O(t,"a")?K(t.a):1,n},S[n.HSL]=function(t,e){var n=_(t.r,t.g,t.b);return delete n.a,bt(n,e)},S.HSLA=function(t,e){var n=ft.HSL(t,e);return n.a=O(t,"a")?K(t.a,e):1,n},S[n.CMYK]=function(t,e){return At(q(t.r,t.g,t.b),e)},S.CMYKA=function(t,e){var n=ft.CMYK(t,e);return n.a=O(t,"a")?K(t.a,e):1,n},S),ht=function(e,r,i,o){var a=ut(e),c="string"==typeof e,u=lt(e,a),s="string"==typeof e&&O(u,"a")||"string"!=typeof e&&O(e,"a"),d=_(u.r,u.g,u.b,u.a);s||delete d.a;var l=i?d.l/(r+1):(100-d.l)/(r+1),f=Array(r).fill(null).map((function(e,n){return t(t({},d),{l:d.l+l*(n+1)*(1-2*+i)})}));switch(a){case n.HEX:default:return f.map((function(e){var n=x(e.h,e.s,e.l);return s&&(n.a=e.a),c?s?Z.HEX(t(t({},n),{a:K(255*n.a)})):Z.HEX(n):s?ft.HEXA(n):ft.HEX(n)}));case n.RGB:return f.map((function(t){var e=x(t.h,t.s,t.l);return s&&(e.a=t.a),c?Z.RGB(e,o):s?ft.RGBA(e,o.decimals):ft.RGB(e,o.decimals)}));case n.HSL:return f.map((function(e){return c?Z.HSL(e,o):s?ft.HSLA(t(t({},x(e.h,e.s,e.l)),{a:e.a}),o.decimals):ft.HSL(x(e.h,e.s,e.l),o.decimals)}))}},pt=((R={buildHarmony:function(t,e,r,i){var o=ut(t),a=lt(t,o),c=_(a.r,a.g,a.b,a.a),u="string"==typeof t&&O(a,"a")||"string"!=typeof t&&O(t,"a"),s="string"==typeof t;switch(o){case n.HEX:default:return u?this.HEXA(bt(c,0),e,r,s):this.HEX(bt(c,0),e,r,s);case n.HSL:return u?this.HSLA(c,e,r,s,i):this.HSL(c,e,r,s,i);case n.RGB:return u?this.RGBA(c,e,r,s,i):this.RGB(c,e,r,s,i)}}})[n.HEX]=function(t,e,n,r){return e(t,n).map((function(t){return r?Z.HEX(x(t.h,t.s,t.l)):ft.HEX(x(t.h,t.s,t.l))}))},R.HEXA=function(e,n,r,i){return n(e,r).map((function(e){return i?Z.HEX(t(t({},x(e.h,e.s,e.l)),{a:255*tt(e.a)})):ft.HEXA(t(t({},x(e.h,e.s,e.l)),{a:tt(e.a)}))}))},R[n.RGB]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?Z.RGB(x(t.h,t.s,t.l),i):ft.RGB(x(t.h,t.s,t.l),i.decimals)}))},R.RGBA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?Z.RGB(t(t({},x(e.h,e.s,e.l)),{a:tt(e.a)}),o):ft.RGBA(t(t({},x(e.h,e.s,e.l)),{a:tt(e.a)}),o.decimals)}))},R[n.HSL]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?Z.HSL({h:t.h,s:t.s,l:t.l},i):ft.HSL(x(t.h,t.s,t.l),i.decimals)}))},R.HSLA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?Z.HSL(t(t({},e),{a:tt(e.a)}),o):ft.HSLA(t(t({},x(e.h,e.s,e.l)),{a:tt(e.a)}),o.decimals)}))},R),gt=((M={mix:function(e,n){var r,o,a,c,u,s,d,l,f,h,p,g,m,b,A,y=e.map((function(t){var e=ut(t);return lt(t,e)})),E=n===i.SUBTRACTIVE?y.map((function(t){var e,n,r,i,o,a,c,u,s,d,l,f,h,p,g=(e=t.r,n=t.g,r=t.b,i=Math.min(e,n,r),o=Math.min(255-e,255-n,255-r),a=e-i,c=n-i,u=r-i,s=Math.min(a,c),d=a-s,l=(c+s)/2,f=(u+c-s)/2,h=Math.max(d,l,f)/Math.max(a,c,u),p=isNaN(h)||h===1/0||h<=0?1:h,{r:d/p+o,y:l/p+o,b:f/p+o});return O(t,"a")&&(g.a=t.a),g})):null;function F(e){var r=n===i.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return e.reduce((function(e,r){var o=O(r,"a")?r.a:1,a={r:Math.min(e.r+r.r*o,255),b:Math.min(e.b+r.b*o,255),a:1-(1-o)*(1-e.a)},c="g"in e?e.g:e.y,u="g"in r?r.g:r.y;return t(t({},a),n===i.ADDITIVE?{g:Math.min(c+u*o,255)}:{y:Math.min(c+u*o,255)})}),r)}if(n===i.ADDITIVE)r=F(y);else{var v=F(E);o=v.r,a=v.y,c=v.b,u=Math.min(o,a,c),s=Math.min(255-o,255-a,255-c),d=o-u,l=a-u,f=c-u,h=Math.min(l,f),p=d+l-h,g=l+h,m=2*(f-h),b=Math.max(p,g,m)/Math.max(d,l,f),A=isNaN(b)||b===1/0||b<=0?1:b,(r={r:p/A+s,g:g/A+s,b:m/A+s}).a=v.a}return{r:K(r.r),g:K(r.g),b:K(r.b),a:N(r.a,0,1)}}})[n.HEX]=function(t,e,n){var r=this.mix(t,e);return delete r.a,n?Z.HEX(r):ft.HEX(r)},M.HEXA=function(t,e,n){var r=this.mix(t,e);return r.a=n?255*tt(r.a):tt(r.a),n?Z.HEX(r):ft.HEXA(r)},M[n.RGB]=function(t,e,n,r){var i=this.mix(t,e);return delete i.a,n?Z.RGB(i,r):ft.RGB(i,r.decimals)},M.RGBA=function(t,e,n,r){var i=this.mix(t,e);return n?Z.RGB(i,r):ft.RGBA(i,r.decimals)},M[n.HSL]=function(t,e,n,r){var i=this.mix(t,e),o=_(i.r,i.g,i.b);return delete i.a,delete o.a,n?Z.HSL(o,r):ft.HSL(i,r.decimals)},M.HSLA=function(t,e,n,r){var i=this.mix(t,e),o=_(i.r,i.g,i.b,i.a);return n?Z.HSL(o,r):ft.HSLA(i,r.decimals)},M),mt=function(e,n){var r=K(e.r,n),i=K(e.g,n),o=K(e.b,n);return t({r:r,g:i,b:o},O(e,"a")?{a:K(e.a,n)}:{})},bt=function(e,n){return t({h:K(e.h,n),s:K(e.s,n),l:K(e.l,n)},O(e,"a")?{a:K(e.a,n)}:{})},At=function(t,e){return{c:K(t.c,e),m:K(t.m,e),y:K(t.y,e),k:K(t.k,e)}},yt=function(t,e,n,r){return r(lt(t,e),n)},Et=function(t,e,n,r,i){n<1&&(n=5);var o=function(t,e,n){var r=n-1,i=(e.r-t.r)/r,o=(e.g-t.g)/r,a=(e.b-t.b)/r,c=tt(t.a),u=(tt(e.a)-c)/r;return Array(n).fill(null).map((function(n,s){return 0===s?t:s===r?e:{r:K(t.r+i*s),g:K(t.g+o*s),b:K(t.b+a*s),a:K(c+u*s)}}))}(lt(t),lt(e),n);return o.map((function(t){return i(t,r)}))},Ft=function(){function n(t,e){void 0===e&&(e={}),this._options=U(e,t),this.rgb=lt(t),this.updateHSL(),this.updateCMYK()}return n.prototype.updateRGB=function(){this.rgb=t(t({},x(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},n.prototype.updateRGBFromCMYK=function(){this.rgb=t(t({},V(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},n.prototype.updateHSL=function(){this.hsl=_(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},n.prototype.updateCMYK=function(){this.cmyk=q(this.rgb.r,this.rgb.g,this.rgb.b)},n.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},n.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},n.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},n.prototype.setOptions=function(e){return void 0===e&&(e={}),this._options=t(t({},this._options),e),this},n.prototype.setH=function(t){return this.hsl.h=T(t),this.updateRGBAndCMYK()},n.prototype.setS=function(t){return this.hsl.s=N(t,0,100),this.updateRGBAndCMYK()},n.prototype.setL=function(t){return this.hsl.l=N(t,0,100),this.updateRGBAndCMYK()},n.prototype.setR=function(t){return this.rgb.r=N(t,0,255),this.updateHSLAndCMYK()},n.prototype.setG=function(t){return this.rgb.g=N(t,0,255),this.updateHSLAndCMYK()},n.prototype.setB=function(t){return this.rgb.b=N(t,0,255),this.updateHSLAndCMYK()},n.prototype.setA=function(t){return this.hsl.a=this.rgb.a=N(t,0,1),this},n.prototype.setC=function(t){return this.cmyk.c=N(t,0,100),this.updateRGBAndHSL()},n.prototype.setM=function(t){return this.cmyk.m=N(t,0,100),this.updateRGBAndHSL()},n.prototype.setY=function(t){return this.cmyk.y=N(t,0,100),this.updateRGBAndHSL()},n.prototype.setK=function(t){return this.cmyk.k=N(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(n.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"H",{get:function(){return K(this.hsl.h,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"S",{get:function(){return K(this.hsl.s,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"L",{get:function(){return K(this.hsl.l,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"R",{get:function(){return K(this.rgb.r,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"G",{get:function(){return K(this.rgb.g,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"B",{get:function(){return K(this.rgb.b,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"A",{get:function(){return K(this.hsl.a,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"C",{get:function(){return K(this.cmyk.c,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"M",{get:function(){return K(this.cmyk.m,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Y",{get:function(){return K(this.cmyk.y,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"K",{get:function(){return K(this.cmyk.k,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXObject",{get:function(){return ft.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXAObject",{get:function(){return ft.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBAObject",{get:function(){return t(t({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLAObject",{get:function(){return t(t({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKAObject",{get:function(){return t(t({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEX",{get:function(){return Z.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXA",{get:function(){return Z.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGB",{get:function(){return Z.RGB({r:this.R,g:this.G,b:this.B},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBA",{get:function(){return Z.RGB({r:this.R,g:this.G,b:this.B,a:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSL",{get:function(){return Z.HSL({h:this.H,s:this.S,l:this.L},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLA",{get:function(){return Z.HSL({h:this.H,s:this.S,l:this.L,a:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYK",{get:function(){return Z.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKA",{get:function(){return Z.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A},this.options)},enumerable:!1,configurable:!0}),n.toHEXObject=function(t){var e=ut(t);return yt(t,e,0,ft.HEX)},n.toHEX=function(t){return Z.HEX(n.toHEXObject(t))},n.toHEXAObject=function(t){var e=ut(t);return yt(t,e,0,ft.HEXA)},n.toHEXA=function(t){return Z.HEX(n.toHEXAObject(t))},n.toRGBObject=function(t,e){void 0===e&&(e={});var n=ut(t);return yt(t,n,e.decimals,ft.RGB)},n.toRGB=function(t,e){void 0===e&&(e={});var n=ut(t),r=U(e,t),i=yt(t,n,6,ft.RGB);return Z.RGB(i,r)},n.toRGBAObject=function(t,e){void 0===e&&(e={});var n=ut(t);return yt(t,n,e.decimals,ft.RGBA)},n.toRGBA=function(t,e){void 0===e&&(e={});var n=ut(t),r=U(e,t),i=yt(t,n,6,ft.RGBA);return Z.RGB(i,r)},n.toHSLObject=function(t,e){void 0===e&&(e={});var n=ut(t);return yt(t,n,e.decimals,ft.HSL)},n.toHSL=function(t,e){void 0===e&&(e={});var n=ut(t),r=U(e,t),i=yt(t,n,6,ft.HSL);return Z.HSL(i,r)},n.toHSLAObject=function(t,e){void 0===e&&(e={});var n=ut(t);return yt(t,n,e.decimals,ft.HSLA)},n.toHSLA=function(t,e){void 0===e&&(e={});var n=ut(t),r=U(e,t),i=yt(t,n,6,ft.HSLA);return Z.HSL(i,r)},n.toCMYKObject=function(t,e){void 0===e&&(e={});var n=ut(t);return yt(t,n,e.decimals,ft.CMYK)},n.toCMYK=function(t,e){void 0===e&&(e={});var n=ut(t),r=U(e,t),i=yt(t,n,6,ft.CMYK);return Z.CMYK(i,r)},n.toCMYKAObject=function(t,e){void 0===e&&(e={});var n=ut(t);return yt(t,n,e.decimals,ft.CMYKA)},n.toCMYKA=function(t,e){void 0===e&&(e={});var n=ut(t),r=U(e,t),i=yt(t,n,6,ft.CMYKA);return Z.CMYK(i,r)},n.getBlendHEXObject=function(t,e,n){return void 0===n&&(n=5),Et(t,e,n,0,ft.HEX)},n.getBlendHEX=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXObject(t,e,r).map((function(t){return Z.HEX(t)}))},n.getBlendHEXAObject=function(t,e,n){return void 0===n&&(n=5),Et(t,e,n,0,ft.HEXA)},n.getBlendHEXA=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXAObject(t,e,r).map((function(t){return Z.HEX(t)}))},n.getBlendRGBObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.RGB)},n.getBlendRGB=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,6,ft.RGB).map((function(n){return Z.RGB(n,U(r,t,e))}))},n.getBlendRGBAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.RGBA)},n.getBlendRGBA=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,6,ft.RGBA).map((function(n){return Z.RGB(n,U(r,t,e))}))},n.getBlendHSLObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.HSL)},n.getBlendHSL=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=U(r,t,e);return Et(t,e,n,6,ft.HSL).map((function(t){return Z.HSL(t,i)}))},n.getBlendHSLAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.HSLA)},n.getBlendHSLA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=U(r,t,e);return Et(t,e,n,6,ft.HSLA).map((function(t){return Z.HSL(t,i)}))},n.getMixHEXObject=function(t,e){return void 0===e&&(e=i.ADDITIVE),gt.HEX(t,e,!1)},n.getMixHEX=function(t,e){return void 0===e&&(e=i.ADDITIVE),gt.HEX(t,e,!0)},n.getMixHEXAObject=function(t,e){return void 0===e&&(e=i.ADDITIVE),gt.HEXA(t,e,!1)},n.getMixHEXA=function(t,e){return void 0===e&&(e=i.ADDITIVE),gt.HEXA(t,e,!0)},n.getMixRGBObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.RGB(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixRGB=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.RGB(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixRGBAObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.RGBA(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixRGBA=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.RGBA(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixHSLObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.HSL(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixHSL=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.HSL(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixHSLAObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.HSLA(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixHSLA=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),gt.HSLA(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getShades=function(t,e,n){return void 0===n&&(n={}),ht(t,e,!0,U(n,t))},n.getTints=function(t,e,n){return void 0===n&&(n={}),ht(t,e,!1,U(n,t))},n.getHarmony=function(t,e,n,o){return void 0===e&&(e=r.COMPLEMENTARY),void 0===n&&(n=i.ADDITIVE),void 0===o&&(o={}),function(t,e,n,i){var o;return(o={},o[r.ANALOGOUS]=pt.buildHarmony(e,nt,n,i),o[r.COMPLEMENTARY]=pt.buildHarmony(e,rt,n,i),o[r.SPLIT_COMPLEMENTARY]=pt.buildHarmony(e,it,n,i),o[r.TRIADIC]=pt.buildHarmony(e,ot,n,i),o[r.TETRADIC]=pt.buildHarmony(e,at,n,i),o[r.SQUARE]=pt.buildHarmony(e,ct,n,i),o)[t]}(e,t,n,U(o,t))},n}();export{Ft as ColorTranslator,r as Harmony,i as Mix};
var t=function(){return t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},t.apply(this,arguments)};function e(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var n,r,i,o;!function(t){t.HEX="HEX",t.RGB="RGB",t.HSL="HSL",t.CIELab="CIELab",t.CMYK="CMYK"}(n||(n={})),function(t){t.ANALOGOUS="ANALOGOUS",t.COMPLEMENTARY="COMPLEMENTARY",t.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",t.TRIADIC="TRIADIC",t.TETRADIC="TETRADIC",t.SQUARE="SQUARE"}(r||(r={})),function(t){t.ADDITIVE="ADDITIVE",t.SUBTRACTIVE="SUBTRACTIVE"}(i||(i={})),function(t){t.black="#000000",t.silver="#C0C0C0",t.gray="#808080",t.white="#FFFFFF",t.maroon="#800000",t.red="#FF0000",t.purple="#800080",t.fuchsia="#FF00FF",t.green="#008000",t.lime="#00FF00",t.olive="#808000",t.yellow="#FFFF00",t.navy="#000080",t.blue="#0000FF",t.teal="#008080",t.aqua="#00FFFF",t.orange="#FFA500",t.aliceblue="#F0F8FF",t.antiquewhite="#FAEBD7",t.aquamarine="#7FFFD4",t.azure="#F0FFFF",t.beige="#F5F5DC",t.bisque="#FFE4C4",t.blanchedalmond="#FFEBCD",t.blueviolet="#8A2BE2",t.brown="#A52A2A",t.burlywood="#DEB887",t.cadetblue="#5F9EA0",t.chartreuse="#7FFF00",t.chocolate="#D2691E",t.coral="#FF7F50",t.cornflowerblue="#6495ED",t.cornsilk="#FFF8DC",t.crimson="#DC143C",t.cyan="#00FFFF",t.darkblue="#00008B",t.darkcyan="#008B8B",t.darkgoldenrod="#B8860B",t.darkgray="#A9A9A9",t.darkgreen="#006400",t.darkgrey="#A9A9A9",t.darkkhaki="#BDB76B",t.darkmagenta="#8B008B",t.darkolivegreen="#556B2F",t.darkorange="#FF8C00",t.darkorchid="#9932CC",t.darkred="#8B0000",t.darksalmon="#E9967A",t.darkseagreen="#8FBC8F",t.darkslateblue="#483D8B",t.darkslategray="#2F4F4F",t.darkslategrey="#2F4F4F",t.darkturquoise="#00CED1",t.darkviolet="#9400D3",t.deeppink="#FF1493",t.deepskyblue="#00BFFF",t.dimgray="#696969",t.dimgrey="#696969",t.dodgerblue="#1E90FF",t.firebrick="#B22222",t.floralwhite="#FFFAF0",t.forestgreen="#228B22",t.gainsboro="#DCDCDC",t.ghostwhite="#F8F8FF",t.gold="#FFD700",t.goldenrod="#DAA520",t.greenyellow="#ADFF2F",t.grey="#808080",t.honeydew="#F0FFF0",t.hotpink="#FF69B4",t.indianred="#CD5C5C",t.indigo="#4B0082",t.ivory="#FFFFF0",t.khaki="#F0E68C",t.lavender="#E6E6FA",t.lavenderblush="#FFF0F5",t.lawngreen="#7CFC00",t.lemonchiffon="#FFFACD",t.lightblue="#ADD8E6",t.lightcoral="#F08080",t.lightcyan="#E0FFFF",t.lightgoldenrodyellow="#FAFAD2",t.lightgray="#D3D3D3",t.lightgreen="#90EE90",t.lightgrey="#D3D3D3",t.lightpink="#FFB6C1",t.lightsalmon="#FFA07A",t.lightseagreen="#20B2AA",t.lightskyblue="#87CEFA",t.lightslategray="#778899",t.lightslategrey="#778899",t.lightsteelblue="#B0C4DE",t.lightyellow="#FFFFE0",t.limegreen="#32CD32",t.linen="#FAF0E6",t.magenta="#FF00FF",t.mediumaquamarine="#66CDAA",t.mediumblue="#0000CD",t.mediumorchid="#BA55D3",t.mediumpurple="#9370DB",t.mediumseagreen="#3CB371",t.mediumslateblue="#7B68EE",t.mediumspringgreen="#00FA9A",t.mediumturquoise="#48D1CC",t.mediumvioletred="#C71585",t.midnightblue="#191970",t.mintcream="#F5FFFA",t.mistyrose="#FFE4E1",t.moccasin="#FFE4B5",t.navajowhite="#FFDEAD",t.oldlace="#FDF5E6",t.olivedrab="#6B8E23",t.orangered="#FF4500",t.orchid="#DA70D6",t.palegoldenrod="#EEE8AA",t.palegreen="#98FB98",t.paleturquoise="#AFEEEE",t.palevioletred="#DB7093",t.papayawhip="#FFEFD5",t.peachpuff="#FFDAB9",t.peru="#CD853F",t.pink="#FFC0CB",t.plum="#DDA0DD",t.powderblue="#B0E0E6",t.rosybrown="#BC8F8F",t.royalblue="#4169E1",t.saddlebrown="#8B4513",t.salmon="#FA8072",t.sandybrown="#F4A460",t.seagreen="#2E8B57",t.seashell="#FFF5EE",t.sienna="#A0522D",t.skyblue="#87CEEB",t.slateblue="#6A5ACD",t.slategray="#708090",t.slategrey="#708090",t.snow="#FFFAFA",t.springgreen="#00FF7F",t.steelblue="#4682B4",t.tan="#D2B48C",t.thistle="#D8BFD8",t.tomato="#FF6347",t.turquoise="#40E0D0",t.violet="#EE82EE",t.wheat="#F5DEB3",t.whitesmoke="#F5F5F5",t.yellowgreen="#9ACD32",t.rebeccapurple="#663399"}(o||(o={}));var a,u,c=Object.keys(o),s={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},d={BGR:n.RGB,ABGR:n.RGB,HLS:n.HSL,AHLS:n.HSL,LAB:n.CIELab,ALAB:n.CIELab,CKMY:n.CMYK,ACKMY:n.CMYK};!function(t){t.NUMBER="number",t.BOOLEAN="boolean"}(a||(a={}));var f,l,h,p=((u={})[n.HEX]=/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,u[n.RGB]=/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[n.HSL]=/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[n.CIELab]=/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[n.CMYK]=/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u),b=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,A=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,E=/^0x([a-f\d]{1,2})$/i,m=/\{(\d+)\}/g,g=/,( +|\d+)/g,C=/ +/,L="The provided string color doesn't have a correct format",v="The provided color object doesn't have the proper keys or format";!function(t){t.NONE="none",t.DEGREES="deg",t.GRADIANS="grad",t.RADIANS="rad",t.TURNS="turn"}(f||(f={})),function(t){t.NONE="none",t.PERCENT="percent"}(l||(l={})),function(t){t.DEVICE_CMYK="device-cmyk",t.CMYK="cmyk"}(h||(h={}));var y,B,F,H,R,S,I={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:f.NONE,rgbUnit:l.NONE,labUnit:l.NONE,cmykUnit:l.PERCENT,alphaUnit:l.NONE,cmykFunction:h.DEVICE_CMYK},G=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},M=function(t){return+"".concat(t).replace(A,"$1")},O=function(t){return A.test("".concat(t))?M(t):Math.min(+t,100)},D=function(t){return 1===t.length&&(t+=t),parseInt(t,16)},j=function(t){var e=T(t,0).toString(16).toUpperCase();return 1===e.length?"0x0".concat(e):"0x".concat(e)},Y=function(t,e){return void 0===e&&(e=!1),!e&&A.test(t)?Math.min(255*M(t)/100,255):E.test(t)?(3===t.length&&(t+=t.slice(-1)),e?T(t)/255:T(t)):Math.min(+t,e?1:255)},k=function(t){return A.test(t)?N(125*M(t)/100,-125,125):N(+t,-125,125)},K=function(t){return Math.min(A.test(t)?M(t)/100:+t,1)},X=function(t){return e([],t,!0).sort().join("").toUpperCase()},T=function(t,e){void 0===e&&(e=6);var n=Math.pow(10,e);return Math.round(+t*n)/n},N=function(t,e,n){return Math.max(e,Math.min(t,n))},P=function(t){if("string"==typeof t){var e=t.match(b),n=+e[1];switch(e[2]){case f.RADIANS:t=T(180*n/Math.PI);break;case f.TURNS:t=T(360*n);break;case f.GRADIANS:t=T(.9*n);break;case f.DEGREES:default:t=n}}return(t>360||t<0)&&(t-=360*Math.floor(t/360)),t},U=function(t,e){var n;switch(e){case f.RADIANS:n=T(function(t){return t*Math.PI/180}(t));break;case f.TURNS:n=T(t/360);break;case f.GRADIANS:n=T(10/9*t);break;case f.DEGREES:case f.NONE:default:n=t}return n},w=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=[],i=[],o=[],u=[],c=[],s=[],d=Object.values(f),E=Object.values(l),m=Object.values(h),L={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0},v=0,y=e;v<y.length;v++){var B=y[v];if("string"==typeof B){if(r.push(B),B.includes(",")){L.legacyCSS++;var F=B.match(g);1===new Set(F).size&&C.test(F[0].slice(1))&&L.spacesAfterCommas++}if(B.match(p.HSL)){var H=(K=B.match(p.HSL))[1]||K[5],R=K[8],S=H.match(b)[2];i.push(""===S?f.NONE:S),s.push(A.test(R));continue}if(p.RGB.test(B)){var G=(K=B.match(p.RGB))[1]||K[5],M=K[2]||K[6],O=K[3]||K[7],D=K[8];o.push(A.test(G)&&A.test(M)&&A.test(O)),s.push(A.test(D));continue}if(p.CIELab.test(B)){var j=(K=B.match(p.CIELab))[1],Y=K[2],k=K[3];D=K[4];u.push(A.test(j)&&A.test(Y)&&A.test(k)),s.push(A.test(D));continue}if(B.match(p.CMYK)){var K,X=(K=B.match(p.CMYK))[1]||K[6],T=K[2]||K[7],N=K[3]||K[8],P=K[4]||K[9];D=K[10];c.push(A.test(X)&&A.test(T)&&A.test(N)&&A.test(P)),B.startsWith("cmyk")&&L.cmykFunction++,s.push(A.test(D))}}}return{decimals:typeof t.decimals===a.NUMBER?t.decimals:I.decimals,legacyCSS:typeof t.legacyCSS===a.BOOLEAN?t.legacyCSS:Boolean(r.length&&L.legacyCSS===r.length)||I.legacyCSS,spacesAfterCommas:typeof t.spacesAfterCommas===a.BOOLEAN?t.spacesAfterCommas:Boolean(r.length&&L.spacesAfterCommas===r.length)||I.spacesAfterCommas,anglesUnit:t.anglesUnit&&d.includes(t.anglesUnit)?t.anglesUnit:1===new Set(i).size?i[0]:I.anglesUnit,rgbUnit:t.rgbUnit&&E.includes(t.rgbUnit)?t.rgbUnit:1===new Set(o).size&&o[0]?l.PERCENT:I.rgbUnit,labUnit:t.labUnit&&E.includes(t.labUnit)?t.labUnit:1===new Set(u).size&&u[0]?l.PERCENT:I.labUnit,cmykUnit:t.cmykUnit&&E.includes(t.cmykUnit)?t.cmykUnit:1!==new Set(c).size||c[0]?I.cmykUnit:l.NONE,alphaUnit:t.alphaUnit&&E.includes(t.alphaUnit)?t.alphaUnit:1===new Set(s).size&&s[0]?l.PERCENT:I.alphaUnit,cmykFunction:t.cmykFunction&&m.includes(t.cmykFunction)?t.cmykFunction:c.length&&c.length===L.cmykFunction?h.CMYK:I.cmykFunction}},x=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],V=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],q=x.map((function(t){return t.reduce((function(t,e){return t+e}),0)})),$=function(t,e,n){return n<0&&(n+=6),n>=6&&(n-=6),T(n<1?255*((e-t)*n+t):n<3?255*e:n<4?255*((e-t)*(4-n)+t):255*t)},_=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},z=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},Q=function(t,e,n,r){var i=[0,0,0],o=[t,e,n];return r.forEach((function(t,e){t.forEach((function(t,n){i[e]+=t*o[n]}))})),i},W=function(t,e,n){e/=100;var r=(n/=100)<=.5?n*(e+1):n+e-n*e,i=2*n-r;return{R:$(i,r,(t/=60)+2),G:$(i,r,t),B:$(i,r,t-2)}},J=function(t,e,n,r){void 0===r&&(r=1),t/=255,e/=255,n/=255,r=Math.min(r,1);var i=Math.max(t,e,n),o=Math.min(t,e,n),a=i-o,u=0,c=0,s=(i+o)/2;if(0!==a){switch(i){case t:u=(e-n)/a%6;break;case e:u=(n-t)/a+2;break;case n:u=(t-e)/a+4}(u=T(60*u))<0&&(u+=360),c=a/(1-Math.abs(2*s-1))}return{H:u,S:T(100*c),L:T(100*s),A:r}},Z=function(t,e,n){var r,i,o,a,u,c,s=[t/255,e/255,n/255].map(_),d=Q(s[0],s[1],s[2],x),f=(r=d[0],i=d[1],o=d[2],u=(a=function(t){return t>Math.pow(6/29,3)?Math.cbrt(t):t/(3*Math.pow(6/29,2))+4/29})(r/q[0]),[116*(c=a(i/q[1]))-16,500*(u-c),200*(c-a(o/q[2]))]);return{L:f[0],a:f[1],b:f[2]}},tt=function(t,e,n){var r=function(t,e,n){var r=function(t){return t>6/29?Math.pow(t,3):3*Math.pow(6/29,2)*(t-4/29)},i=(t+16)/116,o=e/500,a=n/200;return[q[0]*r(i+o),q[1]*r(i),q[2]*r(i-a)]}(t,e,n),i=Q(r[0],r[1],r[2],V).map(z);return{R:N(255*i[0],0,255),G:N(255*i[1],0,255),B:N(255*i[2],0,255)}},et=function(t,e,n,r){return{R:T(255*(1-t)*(r=1-r)),G:T(255*(1-e)*r),B:T(255*(1-n)*r)}},nt=function(t,e,n){t/=255,e/=255,n/=255;var r=1-Math.max(t,e,n),i=1-r,o=i&&(i-e)/i,a=i&&(i-n)/i;return{C:T(100*(i&&(i-t)/i)),M:T(100*o),Y:T(100*a),K:T(100*r)}},rt=function(t,e){if(t<0&&(t+=360),t>360&&(t-=360),360===t||0===t)return t;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=e?r:n,o=0,a=0,u=0,c=0;return(e?n:r).find((function(e,n){return t>=e[0]&&t<e[1]&&(o=e[0],a=e[1],u=i[n][0],c=i[n][1],!0)})),u+(c-u)/(a-o)*(t-o)},it=function(t){return t?", ":","},ot=function(t,e){var n=X(Object.keys(t));return s[d[n]].reduce((function(n,r,i){var o=t[r];return void 0!==o&&n.push(e(o,i)),n}),[])},at=function(t,e){return t.replace(m,(function(t,n){return"".concat(e[+n-1])}))},ut=function(t,e,n){void 0===n&&(n=!1);var r=e.alphaUnit,i=e.legacyCSS,o=e.decimals;return r!==l.PERCENT||i&&!n?T(t,o):"".concat(T(100*t,o),"%")},ct=((y={})[n.HEX]=function(t){var e=ot(t,(function(t){return e=T(t),1===(n=T(e,0).toString(16).toUpperCase()).length&&(n="0".concat(n)),n;var e,n})),n=4===e.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return at(n,e)},y[n.RGB]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.rgbUnit,a=it(i),u=ot(t,(function(t,r){return o===l.PERCENT&&r<3?"".concat(function(t,e){return T(t/255*100,e)}(t,n),"%"):3===r?ut(t,e):T(t,n)})),c=r?4===u.length?"rgba({1}".concat(a,"{2}").concat(a,"{3}").concat(a,"{4})"):"rgb({1}".concat(a,"{2}").concat(a,"{3})"):4===u.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return at(c,u)},y[n.HSL]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.anglesUnit,a=it(i),u=ot(t,(function(t,r){if(0===r&&o!==f.NONE){var i=T(U(t,o),n);return"".concat(i).concat(o)}return 3===r?ut(t,e):T(t,n)})),c=r?4===u.length?"hsla({1}".concat(a,"{2}%").concat(a,"{3}%").concat(a,"{4})"):"hsl({1}".concat(a,"{2}%").concat(a,"{3}%)"):4===u.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return at(c,u)},y[n.CIELab]=function(t,e){var n=e.decimals,r=e.labUnit,i=ot(t,(function(t,i){if(0===i){var o=T(O(t),n);return r===l.PERCENT?"".concat(o,"%"):"".concat(o)}return i<3?r===l.PERCENT?"".concat(function(t,e){return T(t/125*100,e)}(t,n),"%"):T(t,n):ut(t,e,!0)})),o=4===i.length?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return at(o,i)},y[n.CMYK]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.cmykUnit,a=e.cmykFunction,u=it(i),c=ot(t,(function(t,r){return o===l.PERCENT&&r<4?"".concat(T(t,n),"%"):4===r?ut(t,e):T(t/100,n)})),s=r?5===c.length?"".concat(a,"({1}").concat(u,"{2}").concat(u,"{3}").concat(u,"{4}").concat(u,"{5})"):"".concat(a,"({1}").concat(u,"{2}").concat(u,"{3}").concat(u,"{4})"):5===c.length?"".concat(a,"({1} {2} {3} {4} / {5})"):"".concat(a,"({1} {2} {3} {4})");return at(s,c)},y),st=function(t){return"string"==typeof t&&(t=A.test(t)?M(t)/100:+t),isNaN(+t)||t>1?1:T(t)},dt=function(n,r,o){return r.reduce((function(r,a){return e(e([],r,!0),[t(t({},n),{H:o===i.ADDITIVE?P(n.H+a):P(rt(rt(n.H,!1)+a,!0))})],!1)}),[t({},n)])},ft=function(t,e){return dt(t,[30,-30],e)},lt=function(t,e){return dt(t,[180],e)},ht=function(t,e){return dt(t,[150,-150],e)},pt=function(t,e){return dt(t,[120,-120],e)},bt=function(t,e){return dt(t,[60,-120,180],e)},At=function(t,e){return dt(t,[90,-90,180],e)},Et=function(t){return"string"==typeof t?function(t){var e;if(Object.keys(n).some((function(n){if(p[n].test(t))return e=n,!0})),!e&&~c.indexOf(t)&&(e=n.HEX),!e)throw new Error(L);return e}(t):function(t){var e,r=!1,i=X(Object.keys(t));if(d[i]&&(e=d[i]),e&&e===n.RGB){var o=Object.entries(t).some((function(t){return!E.test("".concat(t[1]))})),a=Object.entries(t).some((function(t){return!(A.test("".concat(t[1]))||!E.test("".concat(t[1]))&&!isNaN(+t[1])&&+t[1]<=255)}));o&&a&&(r=!0),o||(e=n.HEX)}if(!e||r)throw new Error(v);return e}(t)},mt=((B={})[n.HEX]=function(t){var e=(~c.indexOf(t)?o[t]:t).match(p.HEX),n={R:D(e[1]||e[5]),G:D(e[2]||e[6]),B:D(e[3]||e[7])},r=e[4]||e[8];return void 0!==r&&(n.A=D(r)/255),n},B[n.RGB]=function(t){var e=t.match(p.RGB),n=Y(e[1]||e[5]),r=Y(e[2]||e[6]),i=Y(e[3]||e[7]),o=e[4]||e[8],a={R:Math.min(n,255),G:Math.min(r,255),B:Math.min(i,255)};return void 0!==o&&(a.A=st(o)),a},B[n.HSL]=function(t){var e=t.match(p.HSL),n=P(e[1]||e[5]),r=O(e[2]||e[6]),i=O(e[3]||e[7]),o=e[4]||e[8],a=W(n,r,i);return void 0!==o&&(a.A=st(o)),a},B[n.CIELab]=function(t){var e=t.match(p.CIELab),n=O(e[1]),r=k(e[2]),i=k(e[3]),o=e[4],a=tt(n,r,i);return void 0!==o&&(a.A=st(o)),a},B[n.CMYK]=function(t){var e=t.match(p.CMYK),n=K(e[1]||e[6]),r=K(e[2]||e[7]),i=K(e[3]||e[8]),o=K(e[4]||e[9]),a=e[5]||e[10],u=et(n,r,i,o);return void 0!==a&&(u.A=st(a)),u},B),gt=((F={})[n.HEX]=function(t){var e={R:Y("".concat(t.R)),G:Y("".concat(t.G)),B:Y("".concat(t.B))};return G(t,"A")&&(e.A=Math.min(Y("".concat(t.A),!0),1)),e},F[n.RGB]=function(t){return this.HEX(t)},F[n.HSL]=function(t){var e=O("".concat(t.S)),n=O("".concat(t.L)),r=W(P(t.H),e,n);return G(t,"A")&&(r.A=st(t.A)),r},F[n.CIELab]=function(t){var e=O("".concat(t.L)),n=k("".concat(t.a)),r=k("".concat(t.b)),i=tt(e,n,r);return G(t,"A")&&(i.A=st(t.A)),i},F[n.CMYK]=function(t){var e=K("".concat(t.C)),n=K("".concat(t.M)),r=K("".concat(t.Y)),i=K("".concat(t.K)),o=et(e,n,r,i);return G(t,"A")&&(o.A=st(t.A)),o},F),Ct=function(t,e){return void 0===e&&(e=Et(t)),"string"==typeof t?mt[e](t):gt[e](t)},Lt=((H={})[n.HEX]=function(t){return{R:j(t.R),G:j(t.G),B:j(t.B)}},H.HEXA=function(t){var e=Lt.HEX(t);return e.A=G(t,"A")?j(255*t.A):"0xFF",e},H[n.RGB]=function(t,e){var n=Ft(t,e);return G(n,"A")&&delete n.A,n},H.RGBA=function(t,e){var n=Lt.RGB(t,e);return n.A=G(t,"A")?T(t.A):1,n},H[n.HSL]=function(t,e){var n=J(t.R,t.G,t.B);return delete n.A,Ht(n,e)},H.HSLA=function(t,e){var n=Lt.HSL(t,e);return n.A=G(t,"A")?T(t.A,e):1,n},H[n.CIELab]=function(t,e){var n=Z(t.R,t.G,t.B);return Rt(n,e)},H.CIELabA=function(t,e){var n=Lt.CIELab(t,e);return n.A=G(t,"A")?T(t.A,e):1,n},H[n.CMYK]=function(t,e){return St(nt(t.R,t.G,t.B),e)},H.CMYKA=function(t,e){var n=Lt.CMYK(t,e);return n.A=G(t,"A")?T(t.A,e):1,n},H),vt=function(e,r,i,o){var a=Et(e),u="string"==typeof e,c=Ct(e,a),s="string"==typeof e&&G(c,"A")||"string"!=typeof e&&G(e,"A"),d=J(c.R,c.G,c.B,c.A);s||delete d.A;var f=i?d.L/(r+1):(100-d.L)/(r+1),l=Array(r).fill(null).map((function(e,n){return t(t({},d),{L:d.L+f*(n+1)*(1-2*+i)})}));switch(a){case n.HEX:default:return l.map((function(e){var n=W(e.H,e.S,e.L);return s&&(n.A=e.A),u?s?ct.HEX(t(t({},n),{A:T(255*n.A)})):ct.HEX(n):s?Lt.HEXA(n):Lt.HEX(n)}));case n.RGB:return l.map((function(t){var e=W(t.H,t.S,t.L);return s&&(e.A=t.A),u?ct.RGB(e,o):s?Lt.RGBA(e,o.decimals):Lt.RGB(e,o.decimals)}));case n.HSL:return l.map((function(e){return u?ct.HSL(e,o):s?Lt.HSLA(t(t({},W(e.H,e.S,e.L)),{A:e.A}),o.decimals):Lt.HSL(W(e.H,e.S,e.L),o.decimals)}));case n.CIELab:return l.map((function(e){var n=W(e.H,e.S,e.L);return u?ct.CIELab(s?Lt.CIELabA(n,o.decimals):Lt.CIELab(n,o.decimals),o):s?Lt.CIELabA(t(t({},n),{A:e.A}),o.decimals):Lt.CIELab(n,o.decimals)}))}},yt=((R={buildHarmony:function(t,e,r,i){var o=Et(t),a=Ct(t,o),u=J(a.R,a.G,a.B,a.A),c="string"==typeof t&&G(a,"A")||"string"!=typeof t&&G(t,"A"),s="string"==typeof t;switch(o){case n.HEX:default:return c?this.HEXA(Ht(u,0),e,r,s):this.HEX(Ht(u,0),e,r,s);case n.HSL:return c?this.HSLA(u,e,r,s,i):this.HSL(u,e,r,s,i);case n.RGB:return c?this.RGBA(u,e,r,s,i):this.RGB(u,e,r,s,i);case n.CIELab:return c?this.CIELabA(u,e,r,s,i):this.CIELab(u,e,r,s,i)}}})[n.HEX]=function(t,e,n,r){return e(t,n).map((function(t){return r?ct.HEX(W(t.H,t.S,t.L)):Lt.HEX(W(t.H,t.S,t.L))}))},R.HEXA=function(e,n,r,i){return n(e,r).map((function(e){return i?ct.HEX(t(t({},W(e.H,e.S,e.L)),{A:255*st(e.A)})):Lt.HEXA(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}))}))},R[n.RGB]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?ct.RGB(W(t.H,t.S,t.L),i):Lt.RGB(W(t.H,t.S,t.L),i.decimals)}))},R.RGBA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?ct.RGB(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}),o):Lt.RGBA(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}),o.decimals)}))},R[n.HSL]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?ct.HSL({H:t.H,S:t.S,L:t.L},i):Lt.HSL(W(t.H,t.S,t.L),i.decimals)}))},R.HSLA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?ct.HSL(t(t({},e),{A:st(e.A)}),o):Lt.HSLA(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}),o.decimals)}))},R[n.CIELab]=function(t,e,n,r,i){return e(t,n).map((function(t){var e=W(t.H,t.S,t.L);return r?ct.CIELab(Z(e.R,e.G,e.B),i):Lt.CIELab(e,i.decimals)}))},R.CIELabA=function(e,n,r,i,o){return n(e,r).map((function(e){var n=W(e.H,e.S,e.L);return i?ct.CIELab(t(t({},Z(n.R,n.G,n.B)),{A:st(e.A)}),o):Lt.CIELabA(t(t({},n),{A:st(e.A)}),o.decimals)}))},R),Bt=((S={mix:function(e,n){var r,o,a,u,c,s,d,f,l,h,p,b,A,E,m,g=e.map((function(t){var e=Et(t);return Ct(t,e)})),C=n===i.SUBTRACTIVE?g.map((function(t){var e,n,r,i,o,a,u,c,s,d,f,l,h,p,b=(e=t.R,n=t.G,r=t.B,i=Math.min(e,n,r),o=Math.min(255-e,255-n,255-r),a=e-i,u=n-i,c=r-i,s=Math.min(a,u),d=a-s,f=(u+s)/2,l=(c+u-s)/2,h=Math.max(d,f,l)/Math.max(a,u,c),p=isNaN(h)||h===1/0||h<=0?1:h,{R:d/p+o,Y:f/p+o,B:l/p+o});return G(t,"A")&&(b.A=t.A),b})):null;function L(e){var r=n===i.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return e.reduce((function(e,r){var o=G(r,"A")?r.A:1,a={R:Math.min(e.R+r.R*o,255),B:Math.min(e.B+r.B*o,255),A:1-(1-o)*(1-e.A)},u="G"in e?e.G:e.Y,c="G"in r?r.G:r.Y;return t(t({},a),n===i.ADDITIVE?{G:Math.min(u+c*o,255)}:{Y:Math.min(u+c*o,255)})}),r)}if(n===i.ADDITIVE)r=L(g);else{var v=L(C);o=v.R,a=v.Y,u=v.B,c=Math.min(o,a,u),s=Math.min(255-o,255-a,255-u),d=o-c,f=a-c,l=u-c,h=Math.min(f,l),p=d+f-h,b=f+h,A=2*(l-h),E=Math.max(p,b,A)/Math.max(d,f,l),m=isNaN(E)||E===1/0||E<=0?1:E,(r={R:p/m+s,G:b/m+s,B:A/m+s}).A=v.A}return{R:T(r.R),G:T(r.G),B:T(r.B),A:N(r.A,0,1)}}})[n.HEX]=function(t,e,n){var r=this.mix(t,e);return delete r.A,n?ct.HEX(r):Lt.HEX(r)},S.HEXA=function(t,e,n){var r=this.mix(t,e);return r.A=n?255*st(r.A):st(r.A),n?ct.HEX(r):Lt.HEXA(r)},S[n.RGB]=function(t,e,n,r){var i=this.mix(t,e);return delete i.A,n?ct.RGB(i,r):Lt.RGB(i,r.decimals)},S.RGBA=function(t,e,n,r){var i=this.mix(t,e);return n?ct.RGB(i,r):Lt.RGBA(i,r.decimals)},S[n.HSL]=function(t,e,n,r){var i=this.mix(t,e),o=J(i.R,i.G,i.B);return delete i.A,delete o.A,n?ct.HSL(o,r):Lt.HSL(i,r.decimals)},S.HSLA=function(t,e,n,r){var i=this.mix(t,e),o=J(i.R,i.G,i.B,i.A);return n?ct.HSL(o,r):Lt.HSLA(i,r.decimals)},S[n.CIELab]=function(t,e,n,r){var i=this.mix(t,e),o=Z(i.R,i.G,i.B);return delete i.A,n?ct.CIELab(o,r):Lt.CIELabA(i,r.decimals)},S.CIELabA=function(t,e,n,r){var i=this.mix(t,e),o=Z(i.R,i.G,i.B);return G(i,"A")&&(o.A=i.A),n?ct.CIELab(o,r):Lt.CIELabA(i,r.decimals)},S),Ft=function(e,n){var r=T(e.R,n),i=T(e.G,n),o=T(e.B,n);return t({R:r,G:i,B:o},G(e,"A")?{A:T(e.A,n)}:{})},Ht=function(e,n){return t({H:T(e.H,n),S:T(e.S,n),L:T(e.L,n)},G(e,"A")?{A:T(e.A,n)}:{})},Rt=function(t,e){return{L:T(t.L,e),a:T(t.a,e),b:T(t.b,e)}},St=function(t,e){return{C:T(t.C,e),M:T(t.M,e),Y:T(t.Y,e),K:T(t.K,e)}},It=function(t,e,n,r){return r(Ct(t,e),n)},Gt=function(t,e,n,r,i){n<1&&(n=5);var o=function(t,e,n){var r=n-1,i=(e.R-t.R)/r,o=(e.G-t.G)/r,a=(e.B-t.B)/r,u=st(t.A),c=(st(e.A)-u)/r;return Array(n).fill(null).map((function(n,s){return 0===s?t:s===r?e:{R:T(t.R+i*s),G:T(t.G+o*s),B:T(t.B+a*s),A:T(u+c*s)}}))}(Ct(t),Ct(e),n);return o.map((function(t){return i(t,r)}))},Mt=function(){function n(t,e){void 0===e&&(e={}),this._options=w(e,t),this.rgb=Ct(t),this.updateHSL(),this.updateLab(),this.updateCMYK()}return n.prototype.updateRGB=function(){this.rgb=t(t({},W(this.hsl.H,this.hsl.S,this.hsl.L)),{A:this.hsl.A})},n.prototype.updateRGBFromCMYK=function(){this.rgb=t(t({},et(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K)),{A:this.rgb.A})},n.prototype.updateRGBFromLab=function(){this.rgb=t(t({},tt(this.lab.L,this.lab.a,this.lab.b)),{A:this.rgb.A})},n.prototype.updateHSL=function(){this.hsl=J(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)},n.prototype.updateLab=function(){this.lab=t(t({},Z(this.rgb.R,this.rgb.G,this.rgb.B)),{A:this.rgb.A})},n.prototype.updateCMYK=function(){this.cmyk=nt(this.rgb.R,this.rgb.G,this.rgb.B)},n.prototype.setOptions=function(e){return void 0===e&&(e={}),this._options=t(t({},this._options),e),this},n.prototype.setH=function(t){return this.hsl.H=P(t),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},n.prototype.setS=function(t){return this.hsl.S=N(t,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},n.prototype.setL=function(t){return this.hsl.L=N(t,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},n.prototype.setR=function(t){this.rgb.R=N(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()},n.prototype.setG=function(t){return this.rgb.G=N(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this},n.prototype.setB=function(t){return this.rgb.B=N(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this},n.prototype.setCIEL=function(t){return this.lab.L=N(t,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},n.prototype.setCIEa=function(t){return this.lab.a=N(t,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},n.prototype.setCIEb=function(t){return this.lab.b=N(t,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},n.prototype.setA=function(t){return this.hsl.A=this.rgb.A=N(t,0,1),this},n.prototype.setC=function(t){return this.cmyk.C=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},n.prototype.setM=function(t){return this.cmyk.M=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},n.prototype.setY=function(t){return this.cmyk.Y=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},n.prototype.setK=function(t){return this.cmyk.K=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},Object.defineProperty(n.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"H",{get:function(){return T(this.hsl.H,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"S",{get:function(){return T(this.hsl.S,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"L",{get:function(){return T(this.hsl.L,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIEL",{get:function(){return T(this.lab.L,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIEa",{get:function(){return T(this.lab.a,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIEb",{get:function(){return T(this.lab.b,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"R",{get:function(){return T(this.rgb.R,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"G",{get:function(){return T(this.rgb.G,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"B",{get:function(){return T(this.rgb.B,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"A",{get:function(){return T(this.hsl.A,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"C",{get:function(){return T(this.cmyk.C,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"M",{get:function(){return T(this.cmyk.M,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Y",{get:function(){return T(this.cmyk.Y,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"K",{get:function(){return T(this.cmyk.K,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXObject",{get:function(){return Lt.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXAObject",{get:function(){return Lt.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBObject",{get:function(){return{R:this.R,G:this.G,B:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBAObject",{get:function(){return t(t({},this.RGBObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLObject",{get:function(){return{H:this.H,S:this.S,L:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLAObject",{get:function(){return t(t({},this.HSLObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELabObject",{get:function(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELabAObject",{get:function(){return t(t({},this.CIELabObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKObject",{get:function(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKAObject",{get:function(){return t(t({},this.CMYKObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEX",{get:function(){return ct.HEX({R:this.R,G:this.G,B:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXA",{get:function(){return ct.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGB",{get:function(){return ct.RGB({R:this.R,G:this.G,B:this.B},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBA",{get:function(){return ct.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSL",{get:function(){return ct.HSL({H:this.H,S:this.S,L:this.L},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLA",{get:function(){return ct.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELab",{get:function(){return ct.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELabA",{get:function(){return ct.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYK",{get:function(){return ct.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKA",{get:function(){return ct.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)},enumerable:!1,configurable:!0}),n.toHEXObject=function(t){var e=Et(t);return It(t,e,0,Lt.HEX)},n.toHEX=function(t){return ct.HEX(n.toHEXObject(t))},n.toHEXAObject=function(t){var e=Et(t);return It(t,e,0,Lt.HEXA)},n.toHEXA=function(t){return ct.HEX(n.toHEXAObject(t))},n.toRGBObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.RGB)},n.toRGB=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.RGB);return ct.RGB(i,r)},n.toRGBAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.RGBA)},n.toRGBA=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.RGBA);return ct.RGB(i,r)},n.toHSLObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.HSL)},n.toHSL=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.HSL);return ct.HSL(i,r)},n.toHSLAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.HSLA)},n.toHSLA=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.HSLA);return ct.HSL(i,r)},n.toCIELabObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.CIELab)},n.toCIELab=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.CIELab);return ct.CIELab(i,r)},n.toCIELabAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.CIELabA)},n.toCIELabA=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.CIELabA);return ct.CIELab(i,r)},n.toCMYKObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.CMYK)},n.toCMYK=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.CMYK);return ct.CMYK(i,r)},n.toCMYKAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return It(t,n,e.decimals,Lt.CMYKA)},n.toCMYKA=function(t,e){void 0===e&&(e={});var n=Et(t),r=w(e,t),i=It(t,n,6,Lt.CMYKA);return ct.CMYK(i,r)},n.getBlendHEXObject=function(t,e,n){return void 0===n&&(n=5),Gt(t,e,n,0,Lt.HEX)},n.getBlendHEX=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXObject(t,e,r).map((function(t){return ct.HEX(t)}))},n.getBlendHEXAObject=function(t,e,n){return void 0===n&&(n=5),Gt(t,e,n,0,Lt.HEXA)},n.getBlendHEXA=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXAObject(t,e,r).map((function(t){return ct.HEX(t)}))},n.getBlendRGBObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,r.decimals,Lt.RGB)},n.getBlendRGB=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,6,Lt.RGB).map((function(n){return ct.RGB(n,w(r,t,e))}))},n.getBlendRGBAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,r.decimals,Lt.RGBA)},n.getBlendRGBA=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,6,Lt.RGBA).map((function(n){return ct.RGB(n,w(r,t,e))}))},n.getBlendHSLObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,r.decimals,Lt.HSL)},n.getBlendHSL=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=w(r,t,e);return Gt(t,e,n,6,Lt.HSL).map((function(t){return ct.HSL(t,i)}))},n.getBlendHSLAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,r.decimals,Lt.HSLA)},n.getBlendHSLA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=w(r,t,e);return Gt(t,e,n,6,Lt.HSLA).map((function(t){return ct.HSL(t,i)}))},n.getBlendCIELabObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,r.decimals,Lt.CIELab)},n.getBlendCIELab=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=w(r,t,e);return Gt(t,e,n,6,Lt.CIELab).map((function(t){return ct.CIELab(t,i)}))},n.getBlendCIELabAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Gt(t,e,n,r.decimals,Lt.CIELabA)},n.getBlendCIELabA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=w(r,t,e);return Gt(t,e,n,6,Lt.CIELabA).map((function(t){return ct.CIELab(t,i)}))},n.getMixHEXObject=function(t,e){return void 0===e&&(e=i.ADDITIVE),Bt.HEX(t,e,!1)},n.getMixHEX=function(t,e){return void 0===e&&(e=i.ADDITIVE),Bt.HEX(t,e,!0)},n.getMixHEXAObject=function(t,e){return void 0===e&&(e=i.ADDITIVE),Bt.HEXA(t,e,!1)},n.getMixHEXA=function(t,e){return void 0===e&&(e=i.ADDITIVE),Bt.HEXA(t,e,!0)},n.getMixRGBObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.RGB(t,n,!1,w.apply(void 0,e([r],t,!1)))},n.getMixRGB=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.RGB(t,n,!0,w.apply(void 0,e([r],t,!1)))},n.getMixRGBAObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.RGBA(t,n,!1,w.apply(void 0,e([r],t,!1)))},n.getMixRGBA=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.RGBA(t,n,!0,w.apply(void 0,e([r],t,!1)))},n.getMixHSLObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.HSL(t,n,!1,w.apply(void 0,e([r],t,!1)))},n.getMixHSL=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.HSL(t,n,!0,w.apply(void 0,e([r],t,!1)))},n.getMixHSLAObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.HSLA(t,n,!1,w.apply(void 0,e([r],t,!1)))},n.getMixHSLA=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.HSLA(t,n,!0,w.apply(void 0,e([r],t,!1)))},n.getMixCIELabObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.CIELab(t,n,!1,w.apply(void 0,e([r],t,!1)))},n.getMixCIELab=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.CIELab(t,n,!0,w.apply(void 0,e([r],t,!1)))},n.getMixCIELabAObject=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.CIELabA(t,n,!1,w.apply(void 0,e([r],t,!1)))},n.getMixCIELabA=function(t,n,r){return void 0===n&&(n=i.ADDITIVE),void 0===r&&(r={}),Bt.CIELabA(t,n,!0,w.apply(void 0,e([r],t,!1)))},n.getShades=function(t,e,n){return void 0===n&&(n={}),vt(t,e,!0,w(n,t))},n.getTints=function(t,e,n){return void 0===n&&(n={}),vt(t,e,!1,w(n,t))},n.getHarmony=function(t,e,n,o){return void 0===e&&(e=r.COMPLEMENTARY),void 0===n&&(n=i.ADDITIVE),void 0===o&&(o={}),function(t,e,n,i){var o;return(o={},o[r.ANALOGOUS]=yt.buildHarmony(e,ft,n,i),o[r.COMPLEMENTARY]=yt.buildHarmony(e,lt,n,i),o[r.SPLIT_COMPLEMENTARY]=yt.buildHarmony(e,ht,n,i),o[r.TRIADIC]=yt.buildHarmony(e,pt,n,i),o[r.TETRADIC]=yt.buildHarmony(e,bt,n,i),o[r.SQUARE]=yt.buildHarmony(e,At,n,i),o)[t]}(e,t,n,w(o,t))},n}();export{Mt as ColorTranslator,r as Harmony,i as Mix};
type NumberOrString = number | string;
interface HEXObject {
r: string;
g: string;
b: string;
a?: string;
R: string;
G: string;
B: string;
A?: string;
}
interface RGBObject {
r: number;
g: number;
b: number;
a?: number;
R: number;
G: number;
B: number;
A?: number;
}
interface RGBObjectGeneric {
r: NumberOrString;
g: NumberOrString;
b: NumberOrString;
a?: NumberOrString;
R: NumberOrString;
G: NumberOrString;
B: NumberOrString;
A?: NumberOrString;
}
interface HSLObject {
h: number;
s: number;
l: number;
a?: number;
H: number;
S: number;
L: number;
A?: number;
}
interface HSLObjectGeneric {
h: number;
s: NumberOrString;
l: NumberOrString;
a?: number;
H: number;
S: NumberOrString;
L: NumberOrString;
A?: NumberOrString;
}
interface CIELabObject {
L: number;
a: number;
b: number;
A?: number;
}
interface CIELabObjectGeneric {
L: NumberOrString;
a: NumberOrString;
b: NumberOrString;
A?: NumberOrString;
}
interface CMYKObject {
c: number;
m: number;
y: number;
k: number;
a?: number;
C: number;
M: number;
Y: number;
K: number;
A?: number;
}
interface CMYKObjectGeneric {
c: NumberOrString;
m: NumberOrString;
y: NumberOrString;
k: NumberOrString;
a?: number;
C: NumberOrString;
M: NumberOrString;
Y: NumberOrString;
K: NumberOrString;
A?: NumberOrString;
}
type Color = RGBObjectGeneric | HSLObjectGeneric | CMYKObjectGeneric;
type Color = RGBObjectGeneric | HSLObjectGeneric | CMYKObjectGeneric | CIELabObjectGeneric;
type ColorInput = string | Color;

@@ -69,2 +81,3 @@ declare enum AnglesUnitEnum {

rgbUnit: ColorUnitEnum;
labUnit: ColorUnitEnum;
cmykUnit: ColorUnitEnum;

@@ -74,6 +87,7 @@ alphaUnit: ColorUnitEnum;

}
type InputOptions = Partial<Omit<Options, "anglesUnit" | "rgbUnit" | "cmykUnit" | "alphaUnit" | "cmykFunction">> & {
type InputOptions = Partial<Omit<Options, "anglesUnit" | "rgbUnit" | "labUnit" | "cmykUnit" | "alphaUnit" | "cmykFunction">> & {
anglesUnit?: `${AnglesUnitEnum}`;
rgbUnit?: `${ColorUnitEnum}`;
cmykUnit?: `${ColorUnitEnum}`;
labUnit?: `${ColorUnitEnum}`;
alphaUnit?: `${ColorUnitEnum}`;

@@ -99,22 +113,25 @@ cmykFunction?: `${CMYKFunctionEnum}`;

private hsl;
private lab;
private cmyk;
private updateRGB;
private updateRGBFromCMYK;
private updateRGBFromLab;
private updateHSL;
private updateLab;
private updateCMYK;
private updateRGBAndCMYK;
private updateHSLAndCMYK;
private updateRGBAndHSL;
setOptions(options?: InputOptions): ColorTranslator;
setH(h: number): ColorTranslator;
setS(s: number): ColorTranslator;
setL(l: number): ColorTranslator;
setR(r: number): ColorTranslator;
setG(g: number): ColorTranslator;
setB(b: number): ColorTranslator;
setA(a: number): ColorTranslator;
setC(c: number): ColorTranslator;
setM(m: number): ColorTranslator;
setY(y: number): ColorTranslator;
setK(k: number): ColorTranslator;
setH(H: number): ColorTranslator;
setS(S: number): ColorTranslator;
setL(L: number): ColorTranslator;
setR(R: number): ColorTranslator;
setG(G: number): ColorTranslator;
setB(B: number): ColorTranslator;
setCIEL(L: number): ColorTranslator;
setCIEa(a: number): ColorTranslator;
setCIEb(b: number): ColorTranslator;
setA(A: number): ColorTranslator;
setC(C: number): ColorTranslator;
setM(M: number): ColorTranslator;
setY(Y: number): ColorTranslator;
setK(K: number): ColorTranslator;
get options(): Options;

@@ -124,2 +141,5 @@ get H(): number;

get L(): number;
get CIEL(): number;
get CIEa(): number;
get CIEb(): number;
get R(): number;

@@ -139,2 +159,4 @@ get G(): number;

get HSLAObject(): HSLObject;
get CIELabObject(): CIELabObject;
get CIELabAObject(): CIELabObject;
get CMYKObject(): CMYKObject;

@@ -148,2 +170,4 @@ get CMYKAObject(): CMYKObject;

get HSLA(): string;
get CIELab(): string;
get CIELabA(): string;
get CMYK(): string;

@@ -163,2 +187,6 @@ get CMYKA(): string;

static toHSLA(color: ColorInput, options?: InputOptions): string;
static toCIELabObject(color: ColorInput, options?: InputOptions): CIELabObject;
static toCIELab(color: ColorInput, options?: InputOptions): string;
static toCIELabAObject(color: ColorInput, options?: InputOptions): CIELabObject;
static toCIELabA(color: ColorInput, options?: InputOptions): string;
static toCMYKObject(color: ColorInput, options?: InputOptions): CMYKObject;

@@ -180,2 +208,6 @@ static toCMYK(color: ColorInput, options?: InputOptions): string;

static getBlendHSLA(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): string[];
static getBlendCIELabObject(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): CIELabObject[];
static getBlendCIELab(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): string[];
static getBlendCIELabAObject(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): CIELabObject[];
static getBlendCIELabA(from: ColorInput, to: ColorInput, steps?: number, options?: InputOptions): string[];
static getMixHEXObject(colors: ColorInput[], mode?: Mix): HEXObject;

@@ -193,2 +225,6 @@ static getMixHEX(colors: ColorInput[], mode?: Mix): string;

static getMixHSLA(colors: ColorInput[], mode?: Mix, options?: InputOptions): string;
static getMixCIELabObject(colors: ColorInput[], mode?: Mix, options?: InputOptions): CIELabObject;
static getMixCIELab(colors: ColorInput[], mode?: Mix, options?: InputOptions): string;
static getMixCIELabAObject(colors: ColorInput[], mode?: Mix, options?: InputOptions): CIELabObject;
static getMixCIELabA(colors: ColorInput[], mode?: Mix, options?: InputOptions): string;
static getShades(color: string, shades: number, options?: InputOptions): string[];

@@ -198,2 +234,3 @@ static getShades(color: HEXObject, shades: number, options?: InputOptions): HEXObject[];

static getShades(color: HSLObjectGeneric, shades: number, options?: InputOptions): HSLObject[];
static getShades(color: CIELabObjectGeneric, shades: number, options?: InputOptions): CIELabObject[];
static getTints(color: string, tints: number, options?: InputOptions): string[];

@@ -203,2 +240,3 @@ static getTints(color: HEXObject, tints: number, options?: InputOptions): HEXObject[];

static getTints(color: HSLObjectGeneric, tints: number, options?: InputOptions): HSLObject[];
static getTints(color: CIELabObjectGeneric, tints: number, options?: InputOptions): CIELabObject[];
static getHarmony(color: string, harmony?: Harmony, mode?: Mix, options?: InputOptions): string[];

@@ -208,3 +246,4 @@ static getHarmony(color: HEXObject, harmony?: Harmony, mode?: Mix, options?: InputOptions): HEXObject[];

static getHarmony(color: HSLObjectGeneric, harmony?: Harmony, mode?: Mix, options?: InputOptions): HSLObject[];
static getHarmony(color: CIELabObjectGeneric, harmony?: Harmony, mode?: Mix, options?: InputOptions): CIELabObject[];
}
export { ColorTranslator, InputOptions, Harmony, Mix, HEXObject, RGBObject, HSLObject, CMYKObject };

@@ -1,1 +0,1 @@

"use strict";var t=function(){return t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},t.apply(this,arguments)};function e(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var n,r,i,o;!function(t){t.HEX="HEX",t.RGB="RGB",t.HSL="HSL",t.CMYK="CMYK"}(n||(n={})),exports.Harmony=void 0,(r=exports.Harmony||(exports.Harmony={})).ANALOGOUS="ANALOGOUS",r.COMPLEMENTARY="COMPLEMENTARY",r.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",r.TRIADIC="TRIADIC",r.TETRADIC="TETRADIC",r.SQUARE="SQUARE",exports.Mix=void 0,(i=exports.Mix||(exports.Mix={})).ADDITIVE="ADDITIVE",i.SUBTRACTIVE="SUBTRACTIVE",function(t){t.black="#000000",t.silver="#C0C0C0",t.gray="#808080",t.white="#FFFFFF",t.maroon="#800000",t.red="#FF0000",t.purple="#800080",t.fuchsia="#FF00FF",t.green="#008000",t.lime="#00FF00",t.olive="#808000",t.yellow="#FFFF00",t.navy="#000080",t.blue="#0000FF",t.teal="#008080",t.aqua="#00FFFF",t.orange="#FFA500",t.aliceblue="#F0F8FF",t.antiquewhite="#FAEBD7",t.aquamarine="#7FFFD4",t.azure="#F0FFFF",t.beige="#F5F5DC",t.bisque="#FFE4C4",t.blanchedalmond="#FFEBCD",t.blueviolet="#8A2BE2",t.brown="#A52A2A",t.burlywood="#DEB887",t.cadetblue="#5F9EA0",t.chartreuse="#7FFF00",t.chocolate="#D2691E",t.coral="#FF7F50",t.cornflowerblue="#6495ED",t.cornsilk="#FFF8DC",t.crimson="#DC143C",t.cyan="#00FFFF",t.darkblue="#00008B",t.darkcyan="#008B8B",t.darkgoldenrod="#B8860B",t.darkgray="#A9A9A9",t.darkgreen="#006400",t.darkgrey="#A9A9A9",t.darkkhaki="#BDB76B",t.darkmagenta="#8B008B",t.darkolivegreen="#556B2F",t.darkorange="#FF8C00",t.darkorchid="#9932CC",t.darkred="#8B0000",t.darksalmon="#E9967A",t.darkseagreen="#8FBC8F",t.darkslateblue="#483D8B",t.darkslategray="#2F4F4F",t.darkslategrey="#2F4F4F",t.darkturquoise="#00CED1",t.darkviolet="#9400D3",t.deeppink="#FF1493",t.deepskyblue="#00BFFF",t.dimgray="#696969",t.dimgrey="#696969",t.dodgerblue="#1E90FF",t.firebrick="#B22222",t.floralwhite="#FFFAF0",t.forestgreen="#228B22",t.gainsboro="#DCDCDC",t.ghostwhite="#F8F8FF",t.gold="#FFD700",t.goldenrod="#DAA520",t.greenyellow="#ADFF2F",t.grey="#808080",t.honeydew="#F0FFF0",t.hotpink="#FF69B4",t.indianred="#CD5C5C",t.indigo="#4B0082",t.ivory="#FFFFF0",t.khaki="#F0E68C",t.lavender="#E6E6FA",t.lavenderblush="#FFF0F5",t.lawngreen="#7CFC00",t.lemonchiffon="#FFFACD",t.lightblue="#ADD8E6",t.lightcoral="#F08080",t.lightcyan="#E0FFFF",t.lightgoldenrodyellow="#FAFAD2",t.lightgray="#D3D3D3",t.lightgreen="#90EE90",t.lightgrey="#D3D3D3",t.lightpink="#FFB6C1",t.lightsalmon="#FFA07A",t.lightseagreen="#20B2AA",t.lightskyblue="#87CEFA",t.lightslategray="#778899",t.lightslategrey="#778899",t.lightsteelblue="#B0C4DE",t.lightyellow="#FFFFE0",t.limegreen="#32CD32",t.linen="#FAF0E6",t.magenta="#FF00FF",t.mediumaquamarine="#66CDAA",t.mediumblue="#0000CD",t.mediumorchid="#BA55D3",t.mediumpurple="#9370DB",t.mediumseagreen="#3CB371",t.mediumslateblue="#7B68EE",t.mediumspringgreen="#00FA9A",t.mediumturquoise="#48D1CC",t.mediumvioletred="#C71585",t.midnightblue="#191970",t.mintcream="#F5FFFA",t.mistyrose="#FFE4E1",t.moccasin="#FFE4B5",t.navajowhite="#FFDEAD",t.oldlace="#FDF5E6",t.olivedrab="#6B8E23",t.orangered="#FF4500",t.orchid="#DA70D6",t.palegoldenrod="#EEE8AA",t.palegreen="#98FB98",t.paleturquoise="#AFEEEE",t.palevioletred="#DB7093",t.papayawhip="#FFEFD5",t.peachpuff="#FFDAB9",t.peru="#CD853F",t.pink="#FFC0CB",t.plum="#DDA0DD",t.powderblue="#B0E0E6",t.rosybrown="#BC8F8F",t.royalblue="#4169E1",t.saddlebrown="#8B4513",t.salmon="#FA8072",t.sandybrown="#F4A460",t.seagreen="#2E8B57",t.seashell="#FFF5EE",t.sienna="#A0522D",t.skyblue="#87CEEB",t.slateblue="#6A5ACD",t.slategray="#708090",t.slategrey="#708090",t.snow="#FFFAFA",t.springgreen="#00FF7F",t.steelblue="#4682B4",t.tan="#D2B48C",t.thistle="#D8BFD8",t.tomato="#FF6347",t.turquoise="#40E0D0",t.violet="#EE82EE",t.wheat="#F5DEB3",t.whitesmoke="#F5F5F5",t.yellowgreen="#9ACD32",t.rebeccapurple="#663399"}(o||(o={}));var a,c,u=Object.keys(o),s={HEX:["r","g","b","a"],RGB:["r","g","b","a"],HSL:["h","s","l","a"],CMYK:["c","m","y","k","a"]},d={BGR:n.RGB,ABGR:n.RGB,HLS:n.HSL,AHLS:n.HSL,CKMY:n.CMYK,ACKMY:n.CMYK};!function(t){t.NUMBER="number",t.BOOLEAN="boolean"}(a||(a={}));var l,f,h,p=((c={})[n.HEX]=/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,c[n.RGB]=/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[n.HSL]=/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[n.CMYK]=/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c),g=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,m=/^(\d+(?:\.\d+)?|\.\d+)%$/,b=/^0x([a-f\d]{1,2})$/i,y=/\{(\d+)\}/g,A=/,( +|\d+)/g,E=/ +/,F="The provided string color doesn't have a correct format",v="The provided color object doesn't have the proper keys or format";!function(t){t.NONE="none",t.DEGREES="deg",t.GRADIANS="grad",t.RADIANS="rad",t.TURNS="turn"}(l||(l={})),function(t){t.NONE="none",t.PERCENT="percent"}(f||(f={})),function(t){t.DEVICE_CMYK="device-cmyk",t.CMYK="cmyk"}(h||(h={}));var H,B,C,S,M,R,D={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:l.NONE,rgbUnit:f.NONE,cmykUnit:f.PERCENT,alphaUnit:f.NONE,cmykFunction:h.DEVICE_CMYK},O=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},L=function(t){return+"".concat(t).replace(m,"$1")},G=function(t){return m.test("".concat(t))?L(t):Math.min(+t,100)},k=function(t){return 1===t.length&&(t+=t),parseInt(t,16)},x=function(t){var e=Y(t,0).toString(16).toUpperCase();return 1===e.length?"0x0".concat(e):"0x".concat(e)},j=function(t,e){return void 0===e&&(e=!1),!e&&m.test(t)?Math.min(255*L(t)/100,255):b.test(t)?(3===t.length&&(t+=t.slice(-1)),e?Y(t)/255:Y(t)):Math.min(+t,e?1:255)},X=function(t){return Math.min(m.test(t)?L(t)/100:+t,1)},I=function(t){return e([],t,!0).sort().join("").toUpperCase()},Y=function(t,e){void 0===e&&(e=6);var n=Math.pow(10,e);return Math.round(+t*n)/n},T=function(t,e,n){return Math.max(e,Math.min(t,n))},K=function(t){if("string"==typeof t){var e=t.match(g),n=+e[1];switch(e[2]){case l.RADIANS:t=Y(180*n/Math.PI);break;case l.TURNS:t=Y(360*n);break;case l.GRADIANS:t=Y(.9*n);break;case l.DEGREES:default:t=n}}return(t>360||t<0)&&(t-=360*Math.floor(t/360)),t},N=function(t,e){var n;switch(e){case l.RADIANS:n=Y(function(t){return t*Math.PI/180}(t));break;case l.TURNS:n=Y(t/360);break;case l.GRADIANS:n=Y(10/9*t);break;case l.DEGREES:case l.NONE:default:n=t}return n},P=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=[],i=[],o=[],c=[],u=[],s=Object.values(l),d=Object.values(f),b=Object.values(h),y={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0},F=0,v=e;F<v.length;F++){var H=v[F];if("string"==typeof H){if(r.push(H),H.includes(",")){y.legacyCSS++;var B=H.match(A);1===new Set(B).size&&E.test(B[0].slice(1))&&y.spacesAfterCommas++}if(H.match(p.HSL)){var C=(k=H.match(p.HSL))[1]||k[5],S=k[8],M=C.match(g)[2];i.push(""===M?l.NONE:M),u.push(m.test(S));continue}if(p.RGB.test(H)){var R=(k=H.match(p.RGB))[1]||k[5],O=k[2]||k[6],L=k[3]||k[7],G=k[8];o.push(m.test(R)&&m.test(O)&&m.test(L)),u.push(m.test(G));continue}if(H.match(p.CMYK)){var k,x=(k=H.match(p.CMYK))[1]||k[6],j=k[2]||k[7],X=k[3]||k[8],I=k[4]||k[9];G=k[10];c.push(m.test(x)&&m.test(j)&&m.test(X)&&m.test(I)),H.startsWith("cmyk")&&y.cmykFunction++,u.push(m.test(G))}}}return{decimals:typeof t.decimals===a.NUMBER?t.decimals:D.decimals,legacyCSS:typeof t.legacyCSS===a.BOOLEAN?t.legacyCSS:Boolean(r.length&&y.legacyCSS===r.length)||D.legacyCSS,spacesAfterCommas:typeof t.spacesAfterCommas===a.BOOLEAN?t.spacesAfterCommas:Boolean(r.length&&y.spacesAfterCommas===r.length)||D.spacesAfterCommas,anglesUnit:t.anglesUnit&&s.includes(t.anglesUnit)?t.anglesUnit:1===new Set(i).size?i[0]:D.anglesUnit,rgbUnit:t.rgbUnit&&d.includes(t.rgbUnit)?t.rgbUnit:1===new Set(o).size&&o[0]?f.PERCENT:D.rgbUnit,cmykUnit:t.cmykUnit&&d.includes(t.cmykUnit)?t.cmykUnit:1!==new Set(c).size||c[0]?D.cmykUnit:f.NONE,alphaUnit:t.alphaUnit&&d.includes(t.alphaUnit)?t.alphaUnit:1===new Set(u).size&&u[0]?f.PERCENT:D.alphaUnit,cmykFunction:t.cmykFunction&&b.includes(t.cmykFunction)?t.cmykFunction:c.length&&c.length===y.cmykFunction?h.CMYK:D.cmykFunction}},U=function(t,e,n){return n<0&&(n+=6),n>=6&&(n-=6),Y(n<1?255*((e-t)*n+t):n<3?255*e:n<4?255*((e-t)*(4-n)+t):255*t)},w=function(t,e,n){e/=100;var r=(n/=100)<=.5?n*(e+1):n+e-n*e,i=2*n-r;return{r:U(i,r,(t/=60)+2),g:U(i,r,t),b:U(i,r,t-2)}},V=function(t,e,n,r){return{r:Y(255*(1-t)*(r=1-r)),g:Y(255*(1-e)*r),b:Y(255*(1-n)*r)}},q=function(t,e,n){t/=255,e/=255,n/=255;var r=1-Math.max(t,e,n),i=1-r,o=i&&(i-e)/i,a=i&&(i-n)/i;return{c:Y(100*(i&&(i-t)/i)),m:Y(100*o),y:Y(100*a),k:Y(100*r)}},_=function(t,e,n,r){void 0===r&&(r=1),t/=255,e/=255,n/=255,r=Math.min(r,1);var i=Math.max(t,e,n),o=Math.min(t,e,n),a=i-o,c=0,u=0,s=(i+o)/2;if(0!==a){switch(i){case t:c=(e-n)/a%6;break;case e:c=(n-t)/a+2;break;case n:c=(t-e)/a+4}(c=Y(60*c))<0&&(c+=360),u=a/(1-Math.abs(2*s-1))}return{h:c,s:Y(100*u),l:Y(100*s),a:r}},$=function(t,e){if(t<0&&(t+=360),t>360&&(t-=360),360===t||0===t)return t;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=e?r:n,o=0,a=0,c=0,u=0;return(e?n:r).find((function(e,n){return t>=e[0]&&t<e[1]&&(o=e[0],a=e[1],c=i[n][0],u=i[n][1],!0)})),c+(u-c)/(a-o)*(t-o)},z=function(t){return t?", ":","},Q=function(t,e){var n=I(Object.keys(t));return s[d[n]].reduce((function(n,r,i){var o=t[r];return void 0!==o&&n.push(e(o,i)),n}),[])},W=function(t,e){return t.replace(y,(function(t,n){return"".concat(e[+n-1])}))},J=function(t,e){var n=e.alphaUnit,r=e.legacyCSS,i=e.decimals;return n!==f.PERCENT||r?Y(t,i):"".concat(Y(100*t,i),"%")},Z=((H={})[n.HEX]=function(t){var e=Q(t,(function(t){return e=Y(t),1===(n=Y(e,0).toString(16).toUpperCase()).length&&(n="0".concat(n)),n;var e,n})),n=4===e.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return W(n,e)},H[n.RGB]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.rgbUnit,a=z(i),c=Q(t,(function(t,r){return o===f.PERCENT&&r<3?"".concat(function(t,e){return Y(t/255*100,e)}(t,n),"%"):3===r?J(t,e):Y(t,n)})),u=r?4===c.length?"rgba({1}".concat(a,"{2}").concat(a,"{3}").concat(a,"{4})"):"rgb({1}".concat(a,"{2}").concat(a,"{3})"):4===c.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return W(u,c)},H[n.HSL]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.anglesUnit,a=z(i),c=Q(t,(function(t,r){if(0===r&&o!==l.NONE){var i=Y(N(t,o),n);return"".concat(i).concat(o)}return 3===r?J(t,e):Y(t,n)})),u=r?4===c.length?"hsla({1}".concat(a,"{2}%").concat(a,"{3}%").concat(a,"{4})"):"hsl({1}".concat(a,"{2}%").concat(a,"{3}%)"):4===c.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return W(u,c)},H[n.CMYK]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.cmykUnit,a=e.cmykFunction,c=z(i),u=Q(t,(function(t,r){return o===f.PERCENT&&r<4?"".concat(Y(t,n),"%"):4===r?J(t,e):Y(t/100,n)})),s=r?5===u.length?"".concat(a,"({1}").concat(c,"{2}").concat(c,"{3}").concat(c,"{4}").concat(c,"{5})"):"".concat(a,"({1}").concat(c,"{2}").concat(c,"{3}").concat(c,"{4})"):5===u.length?"".concat(a,"({1} {2} {3} {4} / {5})"):"".concat(a,"({1} {2} {3} {4})");return W(s,u)},H),tt=function(t){return"string"==typeof t&&(t=m.test(t)?L(t)/100:+t),isNaN(+t)||t>1?1:Y(t)},et=function(n,r,i){return r.reduce((function(r,o){return e(e([],r,!0),[t(t({},n),{h:i===exports.Mix.ADDITIVE?K(n.h+o):K($($(n.h,!1)+o,!0))})],!1)}),[t({},n)])},nt=function(t,e){return et(t,[30,-30],e)},rt=function(t,e){return et(t,[180],e)},it=function(t,e){return et(t,[150,-150],e)},ot=function(t,e){return et(t,[120,-120],e)},at=function(t,e){return et(t,[60,-120,180],e)},ct=function(t,e){return et(t,[90,-90,180],e)},ut=function(t){return"string"==typeof t?function(t){var e;if(Object.keys(n).some((function(n){if(p[n].test(t))return e=n,!0})),!e&&~u.indexOf(t)&&(e=n.HEX),!e)throw new Error(F);return e}(t):function(t){var e,r=!1,i=I(Object.keys(t));if(d[i]&&(e=d[i]),e&&e===n.RGB){var o=Object.entries(t).some((function(t){return!b.test("".concat(t[1]))})),a=Object.entries(t).some((function(t){return!(m.test("".concat(t[1]))||!b.test("".concat(t[1]))&&!isNaN(+t[1])&&+t[1]<=255)}));o&&a&&(r=!0),o||(e=n.HEX)}if(!e||r)throw new Error(v);return e}(t)},st=((B={})[n.HEX]=function(t){var e=(~u.indexOf(t)?o[t]:t).match(p.HEX),n={r:k(e[1]||e[5]),g:k(e[2]||e[6]),b:k(e[3]||e[7])},r=e[4]||e[8];return void 0!==r&&(n.a=k(r)/255),n},B[n.RGB]=function(t){var e=t.match(p.RGB),n=j(e[1]||e[5]),r=j(e[2]||e[6]),i=j(e[3]||e[7]),o=e[4]||e[8],a={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return void 0!==o&&(a.a=tt(o)),a},B[n.HSL]=function(t){var e=t.match(p.HSL),n=K(e[1]||e[5]),r=G(e[2]||e[6]),i=G(e[3]||e[7]),o=e[4]||e[8],a=w(n,r,i);return void 0!==o&&(a.a=tt(o)),a},B[n.CMYK]=function(t){var e=t.match(p.CMYK),n=X(e[1]||e[6]),r=X(e[2]||e[7]),i=X(e[3]||e[8]),o=X(e[4]||e[9]),a=e[5]||e[10],c=V(n,r,i,o);return void 0!==a&&(c.a=tt(a)),c},B),dt=((C={})[n.HEX]=function(t){var e={r:j("".concat(t.r)),g:j("".concat(t.g)),b:j("".concat(t.b))};return O(t,"a")&&(e.a=Math.min(j("".concat(t.a),!0),1)),e},C[n.RGB]=function(t){return this.HEX(t)},C[n.HSL]=function(t){var e=G("".concat(t.s)),n=G("".concat(t.l)),r=w(K(t.h),e,n);return O(t,"a")&&(r.a=tt(t.a)),r},C[n.CMYK]=function(t){var e=X("".concat(t.c)),n=X("".concat(t.m)),r=X("".concat(t.y)),i=X("".concat(t.k)),o=V(e,n,r,i);return O(t,"a")&&(o.a=tt(t.a)),o},C),lt=function(t,e){return void 0===e&&(e=ut(t)),"string"==typeof t?st[e](t):dt[e](t)},ft=((S={})[n.HEX]=function(t){return{r:x(t.r),g:x(t.g),b:x(t.b)}},S.HEXA=function(t){var e=ft.HEX(t);return e.a=O(t,"a")?x(255*t.a):"0xFF",e},S[n.RGB]=function(t,e){var n=mt(t,e);return O(n,"a")&&delete n.a,n},S.RGBA=function(t,e){var n=ft.RGB(t,e);return n.a=O(t,"a")?Y(t.a):1,n},S[n.HSL]=function(t,e){var n=_(t.r,t.g,t.b);return delete n.a,bt(n,e)},S.HSLA=function(t,e){var n=ft.HSL(t,e);return n.a=O(t,"a")?Y(t.a,e):1,n},S[n.CMYK]=function(t,e){return yt(q(t.r,t.g,t.b),e)},S.CMYKA=function(t,e){var n=ft.CMYK(t,e);return n.a=O(t,"a")?Y(t.a,e):1,n},S),ht=function(e,r,i,o){var a=ut(e),c="string"==typeof e,u=lt(e,a),s="string"==typeof e&&O(u,"a")||"string"!=typeof e&&O(e,"a"),d=_(u.r,u.g,u.b,u.a);s||delete d.a;var l=i?d.l/(r+1):(100-d.l)/(r+1),f=Array(r).fill(null).map((function(e,n){return t(t({},d),{l:d.l+l*(n+1)*(1-2*+i)})}));switch(a){case n.HEX:default:return f.map((function(e){var n=w(e.h,e.s,e.l);return s&&(n.a=e.a),c?s?Z.HEX(t(t({},n),{a:Y(255*n.a)})):Z.HEX(n):s?ft.HEXA(n):ft.HEX(n)}));case n.RGB:return f.map((function(t){var e=w(t.h,t.s,t.l);return s&&(e.a=t.a),c?Z.RGB(e,o):s?ft.RGBA(e,o.decimals):ft.RGB(e,o.decimals)}));case n.HSL:return f.map((function(e){return c?Z.HSL(e,o):s?ft.HSLA(t(t({},w(e.h,e.s,e.l)),{a:e.a}),o.decimals):ft.HSL(w(e.h,e.s,e.l),o.decimals)}))}},pt=((M={buildHarmony:function(t,e,r,i){var o=ut(t),a=lt(t,o),c=_(a.r,a.g,a.b,a.a),u="string"==typeof t&&O(a,"a")||"string"!=typeof t&&O(t,"a"),s="string"==typeof t;switch(o){case n.HEX:default:return u?this.HEXA(bt(c,0),e,r,s):this.HEX(bt(c,0),e,r,s);case n.HSL:return u?this.HSLA(c,e,r,s,i):this.HSL(c,e,r,s,i);case n.RGB:return u?this.RGBA(c,e,r,s,i):this.RGB(c,e,r,s,i)}}})[n.HEX]=function(t,e,n,r){return e(t,n).map((function(t){return r?Z.HEX(w(t.h,t.s,t.l)):ft.HEX(w(t.h,t.s,t.l))}))},M.HEXA=function(e,n,r,i){return n(e,r).map((function(e){return i?Z.HEX(t(t({},w(e.h,e.s,e.l)),{a:255*tt(e.a)})):ft.HEXA(t(t({},w(e.h,e.s,e.l)),{a:tt(e.a)}))}))},M[n.RGB]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?Z.RGB(w(t.h,t.s,t.l),i):ft.RGB(w(t.h,t.s,t.l),i.decimals)}))},M.RGBA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?Z.RGB(t(t({},w(e.h,e.s,e.l)),{a:tt(e.a)}),o):ft.RGBA(t(t({},w(e.h,e.s,e.l)),{a:tt(e.a)}),o.decimals)}))},M[n.HSL]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?Z.HSL({h:t.h,s:t.s,l:t.l},i):ft.HSL(w(t.h,t.s,t.l),i.decimals)}))},M.HSLA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?Z.HSL(t(t({},e),{a:tt(e.a)}),o):ft.HSLA(t(t({},w(e.h,e.s,e.l)),{a:tt(e.a)}),o.decimals)}))},M),gt=((R={mix:function(e,n){var r,i,o,a,c,u,s,d,l,f,h,p,g,m,b,y=e.map((function(t){var e=ut(t);return lt(t,e)})),A=n===exports.Mix.SUBTRACTIVE?y.map((function(t){var e,n,r,i,o,a,c,u,s,d,l,f,h,p,g=(e=t.r,n=t.g,r=t.b,i=Math.min(e,n,r),o=Math.min(255-e,255-n,255-r),a=e-i,c=n-i,u=r-i,s=Math.min(a,c),d=a-s,l=(c+s)/2,f=(u+c-s)/2,h=Math.max(d,l,f)/Math.max(a,c,u),p=isNaN(h)||h===1/0||h<=0?1:h,{r:d/p+o,y:l/p+o,b:f/p+o});return O(t,"a")&&(g.a=t.a),g})):null;function E(e){var r=n===exports.Mix.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return e.reduce((function(e,r){var i=O(r,"a")?r.a:1,o={r:Math.min(e.r+r.r*i,255),b:Math.min(e.b+r.b*i,255),a:1-(1-i)*(1-e.a)},a="g"in e?e.g:e.y,c="g"in r?r.g:r.y;return t(t({},o),n===exports.Mix.ADDITIVE?{g:Math.min(a+c*i,255)}:{y:Math.min(a+c*i,255)})}),r)}if(n===exports.Mix.ADDITIVE)r=E(y);else{var F=E(A);i=F.r,o=F.y,a=F.b,c=Math.min(i,o,a),u=Math.min(255-i,255-o,255-a),s=i-c,d=o-c,l=a-c,f=Math.min(d,l),h=s+d-f,p=d+f,g=2*(l-f),m=Math.max(h,p,g)/Math.max(s,d,l),b=isNaN(m)||m===1/0||m<=0?1:m,(r={r:h/b+u,g:p/b+u,b:g/b+u}).a=F.a}return{r:Y(r.r),g:Y(r.g),b:Y(r.b),a:T(r.a,0,1)}}})[n.HEX]=function(t,e,n){var r=this.mix(t,e);return delete r.a,n?Z.HEX(r):ft.HEX(r)},R.HEXA=function(t,e,n){var r=this.mix(t,e);return r.a=n?255*tt(r.a):tt(r.a),n?Z.HEX(r):ft.HEXA(r)},R[n.RGB]=function(t,e,n,r){var i=this.mix(t,e);return delete i.a,n?Z.RGB(i,r):ft.RGB(i,r.decimals)},R.RGBA=function(t,e,n,r){var i=this.mix(t,e);return n?Z.RGB(i,r):ft.RGBA(i,r.decimals)},R[n.HSL]=function(t,e,n,r){var i=this.mix(t,e),o=_(i.r,i.g,i.b);return delete i.a,delete o.a,n?Z.HSL(o,r):ft.HSL(i,r.decimals)},R.HSLA=function(t,e,n,r){var i=this.mix(t,e),o=_(i.r,i.g,i.b,i.a);return n?Z.HSL(o,r):ft.HSLA(i,r.decimals)},R),mt=function(e,n){var r=Y(e.r,n),i=Y(e.g,n),o=Y(e.b,n);return t({r:r,g:i,b:o},O(e,"a")?{a:Y(e.a,n)}:{})},bt=function(e,n){return t({h:Y(e.h,n),s:Y(e.s,n),l:Y(e.l,n)},O(e,"a")?{a:Y(e.a,n)}:{})},yt=function(t,e){return{c:Y(t.c,e),m:Y(t.m,e),y:Y(t.y,e),k:Y(t.k,e)}},At=function(t,e,n,r){return r(lt(t,e),n)},Et=function(t,e,n,r,i){n<1&&(n=5);var o=function(t,e,n){var r=n-1,i=(e.r-t.r)/r,o=(e.g-t.g)/r,a=(e.b-t.b)/r,c=tt(t.a),u=(tt(e.a)-c)/r;return Array(n).fill(null).map((function(n,s){return 0===s?t:s===r?e:{r:Y(t.r+i*s),g:Y(t.g+o*s),b:Y(t.b+a*s),a:Y(c+u*s)}}))}(lt(t),lt(e),n);return o.map((function(t){return i(t,r)}))},Ft=function(){function n(t,e){void 0===e&&(e={}),this._options=P(e,t),this.rgb=lt(t),this.updateHSL(),this.updateCMYK()}return n.prototype.updateRGB=function(){this.rgb=t(t({},w(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},n.prototype.updateRGBFromCMYK=function(){this.rgb=t(t({},V(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},n.prototype.updateHSL=function(){this.hsl=_(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},n.prototype.updateCMYK=function(){this.cmyk=q(this.rgb.r,this.rgb.g,this.rgb.b)},n.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},n.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},n.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},n.prototype.setOptions=function(e){return void 0===e&&(e={}),this._options=t(t({},this._options),e),this},n.prototype.setH=function(t){return this.hsl.h=K(t),this.updateRGBAndCMYK()},n.prototype.setS=function(t){return this.hsl.s=T(t,0,100),this.updateRGBAndCMYK()},n.prototype.setL=function(t){return this.hsl.l=T(t,0,100),this.updateRGBAndCMYK()},n.prototype.setR=function(t){return this.rgb.r=T(t,0,255),this.updateHSLAndCMYK()},n.prototype.setG=function(t){return this.rgb.g=T(t,0,255),this.updateHSLAndCMYK()},n.prototype.setB=function(t){return this.rgb.b=T(t,0,255),this.updateHSLAndCMYK()},n.prototype.setA=function(t){return this.hsl.a=this.rgb.a=T(t,0,1),this},n.prototype.setC=function(t){return this.cmyk.c=T(t,0,100),this.updateRGBAndHSL()},n.prototype.setM=function(t){return this.cmyk.m=T(t,0,100),this.updateRGBAndHSL()},n.prototype.setY=function(t){return this.cmyk.y=T(t,0,100),this.updateRGBAndHSL()},n.prototype.setK=function(t){return this.cmyk.k=T(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(n.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"H",{get:function(){return Y(this.hsl.h,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"S",{get:function(){return Y(this.hsl.s,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"L",{get:function(){return Y(this.hsl.l,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"R",{get:function(){return Y(this.rgb.r,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"G",{get:function(){return Y(this.rgb.g,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"B",{get:function(){return Y(this.rgb.b,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"A",{get:function(){return Y(this.hsl.a,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"C",{get:function(){return Y(this.cmyk.c,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"M",{get:function(){return Y(this.cmyk.m,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Y",{get:function(){return Y(this.cmyk.y,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"K",{get:function(){return Y(this.cmyk.k,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXObject",{get:function(){return ft.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXAObject",{get:function(){return ft.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBAObject",{get:function(){return t(t({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLAObject",{get:function(){return t(t({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKAObject",{get:function(){return t(t({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEX",{get:function(){return Z.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXA",{get:function(){return Z.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGB",{get:function(){return Z.RGB({r:this.R,g:this.G,b:this.B},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBA",{get:function(){return Z.RGB({r:this.R,g:this.G,b:this.B,a:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSL",{get:function(){return Z.HSL({h:this.H,s:this.S,l:this.L},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLA",{get:function(){return Z.HSL({h:this.H,s:this.S,l:this.L,a:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYK",{get:function(){return Z.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKA",{get:function(){return Z.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A},this.options)},enumerable:!1,configurable:!0}),n.toHEXObject=function(t){var e=ut(t);return At(t,e,0,ft.HEX)},n.toHEX=function(t){return Z.HEX(n.toHEXObject(t))},n.toHEXAObject=function(t){var e=ut(t);return At(t,e,0,ft.HEXA)},n.toHEXA=function(t){return Z.HEX(n.toHEXAObject(t))},n.toRGBObject=function(t,e){void 0===e&&(e={});var n=ut(t);return At(t,n,e.decimals,ft.RGB)},n.toRGB=function(t,e){void 0===e&&(e={});var n=ut(t),r=P(e,t),i=At(t,n,6,ft.RGB);return Z.RGB(i,r)},n.toRGBAObject=function(t,e){void 0===e&&(e={});var n=ut(t);return At(t,n,e.decimals,ft.RGBA)},n.toRGBA=function(t,e){void 0===e&&(e={});var n=ut(t),r=P(e,t),i=At(t,n,6,ft.RGBA);return Z.RGB(i,r)},n.toHSLObject=function(t,e){void 0===e&&(e={});var n=ut(t);return At(t,n,e.decimals,ft.HSL)},n.toHSL=function(t,e){void 0===e&&(e={});var n=ut(t),r=P(e,t),i=At(t,n,6,ft.HSL);return Z.HSL(i,r)},n.toHSLAObject=function(t,e){void 0===e&&(e={});var n=ut(t);return At(t,n,e.decimals,ft.HSLA)},n.toHSLA=function(t,e){void 0===e&&(e={});var n=ut(t),r=P(e,t),i=At(t,n,6,ft.HSLA);return Z.HSL(i,r)},n.toCMYKObject=function(t,e){void 0===e&&(e={});var n=ut(t);return At(t,n,e.decimals,ft.CMYK)},n.toCMYK=function(t,e){void 0===e&&(e={});var n=ut(t),r=P(e,t),i=At(t,n,6,ft.CMYK);return Z.CMYK(i,r)},n.toCMYKAObject=function(t,e){void 0===e&&(e={});var n=ut(t);return At(t,n,e.decimals,ft.CMYKA)},n.toCMYKA=function(t,e){void 0===e&&(e={});var n=ut(t),r=P(e,t),i=At(t,n,6,ft.CMYKA);return Z.CMYK(i,r)},n.getBlendHEXObject=function(t,e,n){return void 0===n&&(n=5),Et(t,e,n,0,ft.HEX)},n.getBlendHEX=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXObject(t,e,r).map((function(t){return Z.HEX(t)}))},n.getBlendHEXAObject=function(t,e,n){return void 0===n&&(n=5),Et(t,e,n,0,ft.HEXA)},n.getBlendHEXA=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXAObject(t,e,r).map((function(t){return Z.HEX(t)}))},n.getBlendRGBObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.RGB)},n.getBlendRGB=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,6,ft.RGB).map((function(n){return Z.RGB(n,P(r,t,e))}))},n.getBlendRGBAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.RGBA)},n.getBlendRGBA=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,6,ft.RGBA).map((function(n){return Z.RGB(n,P(r,t,e))}))},n.getBlendHSLObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.HSL)},n.getBlendHSL=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=P(r,t,e);return Et(t,e,n,6,ft.HSL).map((function(t){return Z.HSL(t,i)}))},n.getBlendHSLAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Et(t,e,n,r.decimals,ft.HSLA)},n.getBlendHSLA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=P(r,t,e);return Et(t,e,n,6,ft.HSLA).map((function(t){return Z.HSL(t,i)}))},n.getMixHEXObject=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),gt.HEX(t,e,!1)},n.getMixHEX=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),gt.HEX(t,e,!0)},n.getMixHEXAObject=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),gt.HEXA(t,e,!1)},n.getMixHEXA=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),gt.HEXA(t,e,!0)},n.getMixRGBObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.RGB(t,n,!1,P.apply(void 0,e([r],t,!1)))},n.getMixRGB=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.RGB(t,n,!0,P.apply(void 0,e([r],t,!1)))},n.getMixRGBAObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.RGBA(t,n,!1,P.apply(void 0,e([r],t,!1)))},n.getMixRGBA=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.RGBA(t,n,!0,P.apply(void 0,e([r],t,!1)))},n.getMixHSLObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.HSL(t,n,!1,P.apply(void 0,e([r],t,!1)))},n.getMixHSL=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.HSL(t,n,!0,P.apply(void 0,e([r],t,!1)))},n.getMixHSLAObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.HSLA(t,n,!1,P.apply(void 0,e([r],t,!1)))},n.getMixHSLA=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),gt.HSLA(t,n,!0,P.apply(void 0,e([r],t,!1)))},n.getShades=function(t,e,n){return void 0===n&&(n={}),ht(t,e,!0,P(n,t))},n.getTints=function(t,e,n){return void 0===n&&(n={}),ht(t,e,!1,P(n,t))},n.getHarmony=function(t,e,n,r){return void 0===e&&(e=exports.Harmony.COMPLEMENTARY),void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),function(t,e,n,r){var i;return(i={},i[exports.Harmony.ANALOGOUS]=pt.buildHarmony(e,nt,n,r),i[exports.Harmony.COMPLEMENTARY]=pt.buildHarmony(e,rt,n,r),i[exports.Harmony.SPLIT_COMPLEMENTARY]=pt.buildHarmony(e,it,n,r),i[exports.Harmony.TRIADIC]=pt.buildHarmony(e,ot,n,r),i[exports.Harmony.TETRADIC]=pt.buildHarmony(e,at,n,r),i[exports.Harmony.SQUARE]=pt.buildHarmony(e,ct,n,r),i)[t]}(e,t,n,P(r,t))},n}();exports.ColorTranslator=Ft;
"use strict";var t=function(){return t=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},t.apply(this,arguments)};function e(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var n,r,i,o;!function(t){t.HEX="HEX",t.RGB="RGB",t.HSL="HSL",t.CIELab="CIELab",t.CMYK="CMYK"}(n||(n={})),exports.Harmony=void 0,(r=exports.Harmony||(exports.Harmony={})).ANALOGOUS="ANALOGOUS",r.COMPLEMENTARY="COMPLEMENTARY",r.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",r.TRIADIC="TRIADIC",r.TETRADIC="TETRADIC",r.SQUARE="SQUARE",exports.Mix=void 0,(i=exports.Mix||(exports.Mix={})).ADDITIVE="ADDITIVE",i.SUBTRACTIVE="SUBTRACTIVE",function(t){t.black="#000000",t.silver="#C0C0C0",t.gray="#808080",t.white="#FFFFFF",t.maroon="#800000",t.red="#FF0000",t.purple="#800080",t.fuchsia="#FF00FF",t.green="#008000",t.lime="#00FF00",t.olive="#808000",t.yellow="#FFFF00",t.navy="#000080",t.blue="#0000FF",t.teal="#008080",t.aqua="#00FFFF",t.orange="#FFA500",t.aliceblue="#F0F8FF",t.antiquewhite="#FAEBD7",t.aquamarine="#7FFFD4",t.azure="#F0FFFF",t.beige="#F5F5DC",t.bisque="#FFE4C4",t.blanchedalmond="#FFEBCD",t.blueviolet="#8A2BE2",t.brown="#A52A2A",t.burlywood="#DEB887",t.cadetblue="#5F9EA0",t.chartreuse="#7FFF00",t.chocolate="#D2691E",t.coral="#FF7F50",t.cornflowerblue="#6495ED",t.cornsilk="#FFF8DC",t.crimson="#DC143C",t.cyan="#00FFFF",t.darkblue="#00008B",t.darkcyan="#008B8B",t.darkgoldenrod="#B8860B",t.darkgray="#A9A9A9",t.darkgreen="#006400",t.darkgrey="#A9A9A9",t.darkkhaki="#BDB76B",t.darkmagenta="#8B008B",t.darkolivegreen="#556B2F",t.darkorange="#FF8C00",t.darkorchid="#9932CC",t.darkred="#8B0000",t.darksalmon="#E9967A",t.darkseagreen="#8FBC8F",t.darkslateblue="#483D8B",t.darkslategray="#2F4F4F",t.darkslategrey="#2F4F4F",t.darkturquoise="#00CED1",t.darkviolet="#9400D3",t.deeppink="#FF1493",t.deepskyblue="#00BFFF",t.dimgray="#696969",t.dimgrey="#696969",t.dodgerblue="#1E90FF",t.firebrick="#B22222",t.floralwhite="#FFFAF0",t.forestgreen="#228B22",t.gainsboro="#DCDCDC",t.ghostwhite="#F8F8FF",t.gold="#FFD700",t.goldenrod="#DAA520",t.greenyellow="#ADFF2F",t.grey="#808080",t.honeydew="#F0FFF0",t.hotpink="#FF69B4",t.indianred="#CD5C5C",t.indigo="#4B0082",t.ivory="#FFFFF0",t.khaki="#F0E68C",t.lavender="#E6E6FA",t.lavenderblush="#FFF0F5",t.lawngreen="#7CFC00",t.lemonchiffon="#FFFACD",t.lightblue="#ADD8E6",t.lightcoral="#F08080",t.lightcyan="#E0FFFF",t.lightgoldenrodyellow="#FAFAD2",t.lightgray="#D3D3D3",t.lightgreen="#90EE90",t.lightgrey="#D3D3D3",t.lightpink="#FFB6C1",t.lightsalmon="#FFA07A",t.lightseagreen="#20B2AA",t.lightskyblue="#87CEFA",t.lightslategray="#778899",t.lightslategrey="#778899",t.lightsteelblue="#B0C4DE",t.lightyellow="#FFFFE0",t.limegreen="#32CD32",t.linen="#FAF0E6",t.magenta="#FF00FF",t.mediumaquamarine="#66CDAA",t.mediumblue="#0000CD",t.mediumorchid="#BA55D3",t.mediumpurple="#9370DB",t.mediumseagreen="#3CB371",t.mediumslateblue="#7B68EE",t.mediumspringgreen="#00FA9A",t.mediumturquoise="#48D1CC",t.mediumvioletred="#C71585",t.midnightblue="#191970",t.mintcream="#F5FFFA",t.mistyrose="#FFE4E1",t.moccasin="#FFE4B5",t.navajowhite="#FFDEAD",t.oldlace="#FDF5E6",t.olivedrab="#6B8E23",t.orangered="#FF4500",t.orchid="#DA70D6",t.palegoldenrod="#EEE8AA",t.palegreen="#98FB98",t.paleturquoise="#AFEEEE",t.palevioletred="#DB7093",t.papayawhip="#FFEFD5",t.peachpuff="#FFDAB9",t.peru="#CD853F",t.pink="#FFC0CB",t.plum="#DDA0DD",t.powderblue="#B0E0E6",t.rosybrown="#BC8F8F",t.royalblue="#4169E1",t.saddlebrown="#8B4513",t.salmon="#FA8072",t.sandybrown="#F4A460",t.seagreen="#2E8B57",t.seashell="#FFF5EE",t.sienna="#A0522D",t.skyblue="#87CEEB",t.slateblue="#6A5ACD",t.slategray="#708090",t.slategrey="#708090",t.snow="#FFFAFA",t.springgreen="#00FF7F",t.steelblue="#4682B4",t.tan="#D2B48C",t.thistle="#D8BFD8",t.tomato="#FF6347",t.turquoise="#40E0D0",t.violet="#EE82EE",t.wheat="#F5DEB3",t.whitesmoke="#F5F5F5",t.yellowgreen="#9ACD32",t.rebeccapurple="#663399"}(o||(o={}));var a,u,c=Object.keys(o),s={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},d={BGR:n.RGB,ABGR:n.RGB,HLS:n.HSL,AHLS:n.HSL,LAB:n.CIELab,ALAB:n.CIELab,CKMY:n.CMYK,ACKMY:n.CMYK};!function(t){t.NUMBER="number",t.BOOLEAN="boolean"}(a||(a={}));var l,f,p,h=((u={})[n.HEX]=/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,u[n.RGB]=/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[n.HSL]=/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[n.CIELab]=/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[n.CMYK]=/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u),b=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,A=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,E=/^0x([a-f\d]{1,2})$/i,m=/\{(\d+)\}/g,g=/,( +|\d+)/g,C=/ +/,L="The provided string color doesn't have a correct format",v="The provided color object doesn't have the proper keys or format";!function(t){t.NONE="none",t.DEGREES="deg",t.GRADIANS="grad",t.RADIANS="rad",t.TURNS="turn"}(l||(l={})),function(t){t.NONE="none",t.PERCENT="percent"}(f||(f={})),function(t){t.DEVICE_CMYK="device-cmyk",t.CMYK="cmyk"}(p||(p={}));var y,B,H,F,R,S,M={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:l.NONE,rgbUnit:f.NONE,labUnit:f.NONE,cmykUnit:f.PERCENT,alphaUnit:f.NONE,cmykFunction:p.DEVICE_CMYK},I=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},G=function(t){return+"".concat(t).replace(A,"$1")},O=function(t){return A.test("".concat(t))?G(t):Math.min(+t,100)},D=function(t){return 1===t.length&&(t+=t),parseInt(t,16)},x=function(t){var e=X(t,0).toString(16).toUpperCase();return 1===e.length?"0x0".concat(e):"0x".concat(e)},j=function(t,e){return void 0===e&&(e=!1),!e&&A.test(t)?Math.min(255*G(t)/100,255):E.test(t)?(3===t.length&&(t+=t.slice(-1)),e?X(t)/255:X(t)):Math.min(+t,e?1:255)},Y=function(t){return A.test(t)?T(125*G(t)/100,-125,125):T(+t,-125,125)},k=function(t){return Math.min(A.test(t)?G(t)/100:+t,1)},K=function(t){return e([],t,!0).sort().join("").toUpperCase()},X=function(t,e){void 0===e&&(e=6);var n=Math.pow(10,e);return Math.round(+t*n)/n},T=function(t,e,n){return Math.max(e,Math.min(t,n))},N=function(t){if("string"==typeof t){var e=t.match(b),n=+e[1];switch(e[2]){case l.RADIANS:t=X(180*n/Math.PI);break;case l.TURNS:t=X(360*n);break;case l.GRADIANS:t=X(.9*n);break;case l.DEGREES:default:t=n}}return(t>360||t<0)&&(t-=360*Math.floor(t/360)),t},P=function(t,e){var n;switch(e){case l.RADIANS:n=X(function(t){return t*Math.PI/180}(t));break;case l.TURNS:n=X(t/360);break;case l.GRADIANS:n=X(10/9*t);break;case l.DEGREES:case l.NONE:default:n=t}return n},U=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=[],i=[],o=[],u=[],c=[],s=[],d=Object.values(l),E=Object.values(f),m=Object.values(p),L={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0},v=0,y=e;v<y.length;v++){var B=y[v];if("string"==typeof B){if(r.push(B),B.includes(",")){L.legacyCSS++;var H=B.match(g);1===new Set(H).size&&C.test(H[0].slice(1))&&L.spacesAfterCommas++}if(B.match(h.HSL)){var F=(k=B.match(h.HSL))[1]||k[5],R=k[8],S=F.match(b)[2];i.push(""===S?l.NONE:S),s.push(A.test(R));continue}if(h.RGB.test(B)){var I=(k=B.match(h.RGB))[1]||k[5],G=k[2]||k[6],O=k[3]||k[7],D=k[8];o.push(A.test(I)&&A.test(G)&&A.test(O)),s.push(A.test(D));continue}if(h.CIELab.test(B)){var x=(k=B.match(h.CIELab))[1],j=k[2],Y=k[3];D=k[4];u.push(A.test(x)&&A.test(j)&&A.test(Y)),s.push(A.test(D));continue}if(B.match(h.CMYK)){var k,K=(k=B.match(h.CMYK))[1]||k[6],X=k[2]||k[7],T=k[3]||k[8],N=k[4]||k[9];D=k[10];c.push(A.test(K)&&A.test(X)&&A.test(T)&&A.test(N)),B.startsWith("cmyk")&&L.cmykFunction++,s.push(A.test(D))}}}return{decimals:typeof t.decimals===a.NUMBER?t.decimals:M.decimals,legacyCSS:typeof t.legacyCSS===a.BOOLEAN?t.legacyCSS:Boolean(r.length&&L.legacyCSS===r.length)||M.legacyCSS,spacesAfterCommas:typeof t.spacesAfterCommas===a.BOOLEAN?t.spacesAfterCommas:Boolean(r.length&&L.spacesAfterCommas===r.length)||M.spacesAfterCommas,anglesUnit:t.anglesUnit&&d.includes(t.anglesUnit)?t.anglesUnit:1===new Set(i).size?i[0]:M.anglesUnit,rgbUnit:t.rgbUnit&&E.includes(t.rgbUnit)?t.rgbUnit:1===new Set(o).size&&o[0]?f.PERCENT:M.rgbUnit,labUnit:t.labUnit&&E.includes(t.labUnit)?t.labUnit:1===new Set(u).size&&u[0]?f.PERCENT:M.labUnit,cmykUnit:t.cmykUnit&&E.includes(t.cmykUnit)?t.cmykUnit:1!==new Set(c).size||c[0]?M.cmykUnit:f.NONE,alphaUnit:t.alphaUnit&&E.includes(t.alphaUnit)?t.alphaUnit:1===new Set(s).size&&s[0]?f.PERCENT:M.alphaUnit,cmykFunction:t.cmykFunction&&m.includes(t.cmykFunction)?t.cmykFunction:c.length&&c.length===L.cmykFunction?p.CMYK:M.cmykFunction}},w=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],V=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],q=w.map((function(t){return t.reduce((function(t,e){return t+e}),0)})),$=function(t,e,n){return n<0&&(n+=6),n>=6&&(n-=6),X(n<1?255*((e-t)*n+t):n<3?255*e:n<4?255*((e-t)*(4-n)+t):255*t)},_=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},z=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},Q=function(t,e,n,r){var i=[0,0,0],o=[t,e,n];return r.forEach((function(t,e){t.forEach((function(t,n){i[e]+=t*o[n]}))})),i},W=function(t,e,n){e/=100;var r=(n/=100)<=.5?n*(e+1):n+e-n*e,i=2*n-r;return{R:$(i,r,(t/=60)+2),G:$(i,r,t),B:$(i,r,t-2)}},J=function(t,e,n,r){void 0===r&&(r=1),t/=255,e/=255,n/=255,r=Math.min(r,1);var i=Math.max(t,e,n),o=Math.min(t,e,n),a=i-o,u=0,c=0,s=(i+o)/2;if(0!==a){switch(i){case t:u=(e-n)/a%6;break;case e:u=(n-t)/a+2;break;case n:u=(t-e)/a+4}(u=X(60*u))<0&&(u+=360),c=a/(1-Math.abs(2*s-1))}return{H:u,S:X(100*c),L:X(100*s),A:r}},Z=function(t,e,n){var r,i,o,a,u,c,s=[t/255,e/255,n/255].map(_),d=Q(s[0],s[1],s[2],w),l=(r=d[0],i=d[1],o=d[2],u=(a=function(t){return t>Math.pow(6/29,3)?Math.cbrt(t):t/(3*Math.pow(6/29,2))+4/29})(r/q[0]),[116*(c=a(i/q[1]))-16,500*(u-c),200*(c-a(o/q[2]))]);return{L:l[0],a:l[1],b:l[2]}},tt=function(t,e,n){var r=function(t,e,n){var r=function(t){return t>6/29?Math.pow(t,3):3*Math.pow(6/29,2)*(t-4/29)},i=(t+16)/116,o=e/500,a=n/200;return[q[0]*r(i+o),q[1]*r(i),q[2]*r(i-a)]}(t,e,n),i=Q(r[0],r[1],r[2],V).map(z);return{R:T(255*i[0],0,255),G:T(255*i[1],0,255),B:T(255*i[2],0,255)}},et=function(t,e,n,r){return{R:X(255*(1-t)*(r=1-r)),G:X(255*(1-e)*r),B:X(255*(1-n)*r)}},nt=function(t,e,n){t/=255,e/=255,n/=255;var r=1-Math.max(t,e,n),i=1-r,o=i&&(i-e)/i,a=i&&(i-n)/i;return{C:X(100*(i&&(i-t)/i)),M:X(100*o),Y:X(100*a),K:X(100*r)}},rt=function(t,e){if(t<0&&(t+=360),t>360&&(t-=360),360===t||0===t)return t;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=e?r:n,o=0,a=0,u=0,c=0;return(e?n:r).find((function(e,n){return t>=e[0]&&t<e[1]&&(o=e[0],a=e[1],u=i[n][0],c=i[n][1],!0)})),u+(c-u)/(a-o)*(t-o)},it=function(t){return t?", ":","},ot=function(t,e){var n=K(Object.keys(t));return s[d[n]].reduce((function(n,r,i){var o=t[r];return void 0!==o&&n.push(e(o,i)),n}),[])},at=function(t,e){return t.replace(m,(function(t,n){return"".concat(e[+n-1])}))},ut=function(t,e,n){void 0===n&&(n=!1);var r=e.alphaUnit,i=e.legacyCSS,o=e.decimals;return r!==f.PERCENT||i&&!n?X(t,o):"".concat(X(100*t,o),"%")},ct=((y={})[n.HEX]=function(t){var e=ot(t,(function(t){return e=X(t),1===(n=X(e,0).toString(16).toUpperCase()).length&&(n="0".concat(n)),n;var e,n})),n=4===e.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return at(n,e)},y[n.RGB]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.rgbUnit,a=it(i),u=ot(t,(function(t,r){return o===f.PERCENT&&r<3?"".concat(function(t,e){return X(t/255*100,e)}(t,n),"%"):3===r?ut(t,e):X(t,n)})),c=r?4===u.length?"rgba({1}".concat(a,"{2}").concat(a,"{3}").concat(a,"{4})"):"rgb({1}".concat(a,"{2}").concat(a,"{3})"):4===u.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return at(c,u)},y[n.HSL]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.anglesUnit,a=it(i),u=ot(t,(function(t,r){if(0===r&&o!==l.NONE){var i=X(P(t,o),n);return"".concat(i).concat(o)}return 3===r?ut(t,e):X(t,n)})),c=r?4===u.length?"hsla({1}".concat(a,"{2}%").concat(a,"{3}%").concat(a,"{4})"):"hsl({1}".concat(a,"{2}%").concat(a,"{3}%)"):4===u.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return at(c,u)},y[n.CIELab]=function(t,e){var n=e.decimals,r=e.labUnit,i=ot(t,(function(t,i){if(0===i){var o=X(O(t),n);return r===f.PERCENT?"".concat(o,"%"):"".concat(o)}return i<3?r===f.PERCENT?"".concat(function(t,e){return X(t/125*100,e)}(t,n),"%"):X(t,n):ut(t,e,!0)})),o=4===i.length?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return at(o,i)},y[n.CMYK]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.cmykUnit,a=e.cmykFunction,u=it(i),c=ot(t,(function(t,r){return o===f.PERCENT&&r<4?"".concat(X(t,n),"%"):4===r?ut(t,e):X(t/100,n)})),s=r?5===c.length?"".concat(a,"({1}").concat(u,"{2}").concat(u,"{3}").concat(u,"{4}").concat(u,"{5})"):"".concat(a,"({1}").concat(u,"{2}").concat(u,"{3}").concat(u,"{4})"):5===c.length?"".concat(a,"({1} {2} {3} {4} / {5})"):"".concat(a,"({1} {2} {3} {4})");return at(s,c)},y),st=function(t){return"string"==typeof t&&(t=A.test(t)?G(t)/100:+t),isNaN(+t)||t>1?1:X(t)},dt=function(n,r,i){return r.reduce((function(r,o){return e(e([],r,!0),[t(t({},n),{H:i===exports.Mix.ADDITIVE?N(n.H+o):N(rt(rt(n.H,!1)+o,!0))})],!1)}),[t({},n)])},lt=function(t,e){return dt(t,[30,-30],e)},ft=function(t,e){return dt(t,[180],e)},pt=function(t,e){return dt(t,[150,-150],e)},ht=function(t,e){return dt(t,[120,-120],e)},bt=function(t,e){return dt(t,[60,-120,180],e)},At=function(t,e){return dt(t,[90,-90,180],e)},Et=function(t){return"string"==typeof t?function(t){var e;if(Object.keys(n).some((function(n){if(h[n].test(t))return e=n,!0})),!e&&~c.indexOf(t)&&(e=n.HEX),!e)throw new Error(L);return e}(t):function(t){var e,r=!1,i=K(Object.keys(t));if(d[i]&&(e=d[i]),e&&e===n.RGB){var o=Object.entries(t).some((function(t){return!E.test("".concat(t[1]))})),a=Object.entries(t).some((function(t){return!(A.test("".concat(t[1]))||!E.test("".concat(t[1]))&&!isNaN(+t[1])&&+t[1]<=255)}));o&&a&&(r=!0),o||(e=n.HEX)}if(!e||r)throw new Error(v);return e}(t)},mt=((B={})[n.HEX]=function(t){var e=(~c.indexOf(t)?o[t]:t).match(h.HEX),n={R:D(e[1]||e[5]),G:D(e[2]||e[6]),B:D(e[3]||e[7])},r=e[4]||e[8];return void 0!==r&&(n.A=D(r)/255),n},B[n.RGB]=function(t){var e=t.match(h.RGB),n=j(e[1]||e[5]),r=j(e[2]||e[6]),i=j(e[3]||e[7]),o=e[4]||e[8],a={R:Math.min(n,255),G:Math.min(r,255),B:Math.min(i,255)};return void 0!==o&&(a.A=st(o)),a},B[n.HSL]=function(t){var e=t.match(h.HSL),n=N(e[1]||e[5]),r=O(e[2]||e[6]),i=O(e[3]||e[7]),o=e[4]||e[8],a=W(n,r,i);return void 0!==o&&(a.A=st(o)),a},B[n.CIELab]=function(t){var e=t.match(h.CIELab),n=O(e[1]),r=Y(e[2]),i=Y(e[3]),o=e[4],a=tt(n,r,i);return void 0!==o&&(a.A=st(o)),a},B[n.CMYK]=function(t){var e=t.match(h.CMYK),n=k(e[1]||e[6]),r=k(e[2]||e[7]),i=k(e[3]||e[8]),o=k(e[4]||e[9]),a=e[5]||e[10],u=et(n,r,i,o);return void 0!==a&&(u.A=st(a)),u},B),gt=((H={})[n.HEX]=function(t){var e={R:j("".concat(t.R)),G:j("".concat(t.G)),B:j("".concat(t.B))};return I(t,"A")&&(e.A=Math.min(j("".concat(t.A),!0),1)),e},H[n.RGB]=function(t){return this.HEX(t)},H[n.HSL]=function(t){var e=O("".concat(t.S)),n=O("".concat(t.L)),r=W(N(t.H),e,n);return I(t,"A")&&(r.A=st(t.A)),r},H[n.CIELab]=function(t){var e=O("".concat(t.L)),n=Y("".concat(t.a)),r=Y("".concat(t.b)),i=tt(e,n,r);return I(t,"A")&&(i.A=st(t.A)),i},H[n.CMYK]=function(t){var e=k("".concat(t.C)),n=k("".concat(t.M)),r=k("".concat(t.Y)),i=k("".concat(t.K)),o=et(e,n,r,i);return I(t,"A")&&(o.A=st(t.A)),o},H),Ct=function(t,e){return void 0===e&&(e=Et(t)),"string"==typeof t?mt[e](t):gt[e](t)},Lt=((F={})[n.HEX]=function(t){return{R:x(t.R),G:x(t.G),B:x(t.B)}},F.HEXA=function(t){var e=Lt.HEX(t);return e.A=I(t,"A")?x(255*t.A):"0xFF",e},F[n.RGB]=function(t,e){var n=Ht(t,e);return I(n,"A")&&delete n.A,n},F.RGBA=function(t,e){var n=Lt.RGB(t,e);return n.A=I(t,"A")?X(t.A):1,n},F[n.HSL]=function(t,e){var n=J(t.R,t.G,t.B);return delete n.A,Ft(n,e)},F.HSLA=function(t,e){var n=Lt.HSL(t,e);return n.A=I(t,"A")?X(t.A,e):1,n},F[n.CIELab]=function(t,e){var n=Z(t.R,t.G,t.B);return Rt(n,e)},F.CIELabA=function(t,e){var n=Lt.CIELab(t,e);return n.A=I(t,"A")?X(t.A,e):1,n},F[n.CMYK]=function(t,e){return St(nt(t.R,t.G,t.B),e)},F.CMYKA=function(t,e){var n=Lt.CMYK(t,e);return n.A=I(t,"A")?X(t.A,e):1,n},F),vt=function(e,r,i,o){var a=Et(e),u="string"==typeof e,c=Ct(e,a),s="string"==typeof e&&I(c,"A")||"string"!=typeof e&&I(e,"A"),d=J(c.R,c.G,c.B,c.A);s||delete d.A;var l=i?d.L/(r+1):(100-d.L)/(r+1),f=Array(r).fill(null).map((function(e,n){return t(t({},d),{L:d.L+l*(n+1)*(1-2*+i)})}));switch(a){case n.HEX:default:return f.map((function(e){var n=W(e.H,e.S,e.L);return s&&(n.A=e.A),u?s?ct.HEX(t(t({},n),{A:X(255*n.A)})):ct.HEX(n):s?Lt.HEXA(n):Lt.HEX(n)}));case n.RGB:return f.map((function(t){var e=W(t.H,t.S,t.L);return s&&(e.A=t.A),u?ct.RGB(e,o):s?Lt.RGBA(e,o.decimals):Lt.RGB(e,o.decimals)}));case n.HSL:return f.map((function(e){return u?ct.HSL(e,o):s?Lt.HSLA(t(t({},W(e.H,e.S,e.L)),{A:e.A}),o.decimals):Lt.HSL(W(e.H,e.S,e.L),o.decimals)}));case n.CIELab:return f.map((function(e){var n=W(e.H,e.S,e.L);return u?ct.CIELab(s?Lt.CIELabA(n,o.decimals):Lt.CIELab(n,o.decimals),o):s?Lt.CIELabA(t(t({},n),{A:e.A}),o.decimals):Lt.CIELab(n,o.decimals)}))}},yt=((R={buildHarmony:function(t,e,r,i){var o=Et(t),a=Ct(t,o),u=J(a.R,a.G,a.B,a.A),c="string"==typeof t&&I(a,"A")||"string"!=typeof t&&I(t,"A"),s="string"==typeof t;switch(o){case n.HEX:default:return c?this.HEXA(Ft(u,0),e,r,s):this.HEX(Ft(u,0),e,r,s);case n.HSL:return c?this.HSLA(u,e,r,s,i):this.HSL(u,e,r,s,i);case n.RGB:return c?this.RGBA(u,e,r,s,i):this.RGB(u,e,r,s,i);case n.CIELab:return c?this.CIELabA(u,e,r,s,i):this.CIELab(u,e,r,s,i)}}})[n.HEX]=function(t,e,n,r){return e(t,n).map((function(t){return r?ct.HEX(W(t.H,t.S,t.L)):Lt.HEX(W(t.H,t.S,t.L))}))},R.HEXA=function(e,n,r,i){return n(e,r).map((function(e){return i?ct.HEX(t(t({},W(e.H,e.S,e.L)),{A:255*st(e.A)})):Lt.HEXA(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}))}))},R[n.RGB]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?ct.RGB(W(t.H,t.S,t.L),i):Lt.RGB(W(t.H,t.S,t.L),i.decimals)}))},R.RGBA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?ct.RGB(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}),o):Lt.RGBA(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}),o.decimals)}))},R[n.HSL]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?ct.HSL({H:t.H,S:t.S,L:t.L},i):Lt.HSL(W(t.H,t.S,t.L),i.decimals)}))},R.HSLA=function(e,n,r,i,o){return n(e,r).map((function(e){return i?ct.HSL(t(t({},e),{A:st(e.A)}),o):Lt.HSLA(t(t({},W(e.H,e.S,e.L)),{A:st(e.A)}),o.decimals)}))},R[n.CIELab]=function(t,e,n,r,i){return e(t,n).map((function(t){var e=W(t.H,t.S,t.L);return r?ct.CIELab(Z(e.R,e.G,e.B),i):Lt.CIELab(e,i.decimals)}))},R.CIELabA=function(e,n,r,i,o){return n(e,r).map((function(e){var n=W(e.H,e.S,e.L);return i?ct.CIELab(t(t({},Z(n.R,n.G,n.B)),{A:st(e.A)}),o):Lt.CIELabA(t(t({},n),{A:st(e.A)}),o.decimals)}))},R),Bt=((S={mix:function(e,n){var r,i,o,a,u,c,s,d,l,f,p,h,b,A,E,m=e.map((function(t){var e=Et(t);return Ct(t,e)})),g=n===exports.Mix.SUBTRACTIVE?m.map((function(t){var e,n,r,i,o,a,u,c,s,d,l,f,p,h,b=(e=t.R,n=t.G,r=t.B,i=Math.min(e,n,r),o=Math.min(255-e,255-n,255-r),a=e-i,u=n-i,c=r-i,s=Math.min(a,u),d=a-s,l=(u+s)/2,f=(c+u-s)/2,p=Math.max(d,l,f)/Math.max(a,u,c),h=isNaN(p)||p===1/0||p<=0?1:p,{R:d/h+o,Y:l/h+o,B:f/h+o});return I(t,"A")&&(b.A=t.A),b})):null;function C(e){var r=n===exports.Mix.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return e.reduce((function(e,r){var i=I(r,"A")?r.A:1,o={R:Math.min(e.R+r.R*i,255),B:Math.min(e.B+r.B*i,255),A:1-(1-i)*(1-e.A)},a="G"in e?e.G:e.Y,u="G"in r?r.G:r.Y;return t(t({},o),n===exports.Mix.ADDITIVE?{G:Math.min(a+u*i,255)}:{Y:Math.min(a+u*i,255)})}),r)}if(n===exports.Mix.ADDITIVE)r=C(m);else{var L=C(g);i=L.R,o=L.Y,a=L.B,u=Math.min(i,o,a),c=Math.min(255-i,255-o,255-a),s=i-u,d=o-u,l=a-u,f=Math.min(d,l),p=s+d-f,h=d+f,b=2*(l-f),A=Math.max(p,h,b)/Math.max(s,d,l),E=isNaN(A)||A===1/0||A<=0?1:A,(r={R:p/E+c,G:h/E+c,B:b/E+c}).A=L.A}return{R:X(r.R),G:X(r.G),B:X(r.B),A:T(r.A,0,1)}}})[n.HEX]=function(t,e,n){var r=this.mix(t,e);return delete r.A,n?ct.HEX(r):Lt.HEX(r)},S.HEXA=function(t,e,n){var r=this.mix(t,e);return r.A=n?255*st(r.A):st(r.A),n?ct.HEX(r):Lt.HEXA(r)},S[n.RGB]=function(t,e,n,r){var i=this.mix(t,e);return delete i.A,n?ct.RGB(i,r):Lt.RGB(i,r.decimals)},S.RGBA=function(t,e,n,r){var i=this.mix(t,e);return n?ct.RGB(i,r):Lt.RGBA(i,r.decimals)},S[n.HSL]=function(t,e,n,r){var i=this.mix(t,e),o=J(i.R,i.G,i.B);return delete i.A,delete o.A,n?ct.HSL(o,r):Lt.HSL(i,r.decimals)},S.HSLA=function(t,e,n,r){var i=this.mix(t,e),o=J(i.R,i.G,i.B,i.A);return n?ct.HSL(o,r):Lt.HSLA(i,r.decimals)},S[n.CIELab]=function(t,e,n,r){var i=this.mix(t,e),o=Z(i.R,i.G,i.B);return delete i.A,n?ct.CIELab(o,r):Lt.CIELabA(i,r.decimals)},S.CIELabA=function(t,e,n,r){var i=this.mix(t,e),o=Z(i.R,i.G,i.B);return I(i,"A")&&(o.A=i.A),n?ct.CIELab(o,r):Lt.CIELabA(i,r.decimals)},S),Ht=function(e,n){var r=X(e.R,n),i=X(e.G,n),o=X(e.B,n);return t({R:r,G:i,B:o},I(e,"A")?{A:X(e.A,n)}:{})},Ft=function(e,n){return t({H:X(e.H,n),S:X(e.S,n),L:X(e.L,n)},I(e,"A")?{A:X(e.A,n)}:{})},Rt=function(t,e){return{L:X(t.L,e),a:X(t.a,e),b:X(t.b,e)}},St=function(t,e){return{C:X(t.C,e),M:X(t.M,e),Y:X(t.Y,e),K:X(t.K,e)}},Mt=function(t,e,n,r){return r(Ct(t,e),n)},It=function(t,e,n,r,i){n<1&&(n=5);var o=function(t,e,n){var r=n-1,i=(e.R-t.R)/r,o=(e.G-t.G)/r,a=(e.B-t.B)/r,u=st(t.A),c=(st(e.A)-u)/r;return Array(n).fill(null).map((function(n,s){return 0===s?t:s===r?e:{R:X(t.R+i*s),G:X(t.G+o*s),B:X(t.B+a*s),A:X(u+c*s)}}))}(Ct(t),Ct(e),n);return o.map((function(t){return i(t,r)}))},Gt=function(){function n(t,e){void 0===e&&(e={}),this._options=U(e,t),this.rgb=Ct(t),this.updateHSL(),this.updateLab(),this.updateCMYK()}return n.prototype.updateRGB=function(){this.rgb=t(t({},W(this.hsl.H,this.hsl.S,this.hsl.L)),{A:this.hsl.A})},n.prototype.updateRGBFromCMYK=function(){this.rgb=t(t({},et(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K)),{A:this.rgb.A})},n.prototype.updateRGBFromLab=function(){this.rgb=t(t({},tt(this.lab.L,this.lab.a,this.lab.b)),{A:this.rgb.A})},n.prototype.updateHSL=function(){this.hsl=J(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)},n.prototype.updateLab=function(){this.lab=t(t({},Z(this.rgb.R,this.rgb.G,this.rgb.B)),{A:this.rgb.A})},n.prototype.updateCMYK=function(){this.cmyk=nt(this.rgb.R,this.rgb.G,this.rgb.B)},n.prototype.setOptions=function(e){return void 0===e&&(e={}),this._options=t(t({},this._options),e),this},n.prototype.setH=function(t){return this.hsl.H=N(t),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},n.prototype.setS=function(t){return this.hsl.S=T(t,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},n.prototype.setL=function(t){return this.hsl.L=T(t,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},n.prototype.setR=function(t){this.rgb.R=T(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()},n.prototype.setG=function(t){return this.rgb.G=T(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this},n.prototype.setB=function(t){return this.rgb.B=T(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this},n.prototype.setCIEL=function(t){return this.lab.L=T(t,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},n.prototype.setCIEa=function(t){return this.lab.a=T(t,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},n.prototype.setCIEb=function(t){return this.lab.b=T(t,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},n.prototype.setA=function(t){return this.hsl.A=this.rgb.A=T(t,0,1),this},n.prototype.setC=function(t){return this.cmyk.C=T(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},n.prototype.setM=function(t){return this.cmyk.M=T(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},n.prototype.setY=function(t){return this.cmyk.Y=T(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},n.prototype.setK=function(t){return this.cmyk.K=T(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},Object.defineProperty(n.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"H",{get:function(){return X(this.hsl.H,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"S",{get:function(){return X(this.hsl.S,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"L",{get:function(){return X(this.hsl.L,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIEL",{get:function(){return X(this.lab.L,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIEa",{get:function(){return X(this.lab.a,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIEb",{get:function(){return X(this.lab.b,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"R",{get:function(){return X(this.rgb.R,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"G",{get:function(){return X(this.rgb.G,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"B",{get:function(){return X(this.rgb.B,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"A",{get:function(){return X(this.hsl.A,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"C",{get:function(){return X(this.cmyk.C,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"M",{get:function(){return X(this.cmyk.M,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"Y",{get:function(){return X(this.cmyk.Y,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"K",{get:function(){return X(this.cmyk.K,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXObject",{get:function(){return Lt.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXAObject",{get:function(){return Lt.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBObject",{get:function(){return{R:this.R,G:this.G,B:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBAObject",{get:function(){return t(t({},this.RGBObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLObject",{get:function(){return{H:this.H,S:this.S,L:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLAObject",{get:function(){return t(t({},this.HSLObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELabObject",{get:function(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELabAObject",{get:function(){return t(t({},this.CIELabObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKObject",{get:function(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKAObject",{get:function(){return t(t({},this.CMYKObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEX",{get:function(){return ct.HEX({R:this.R,G:this.G,B:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HEXA",{get:function(){return ct.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGB",{get:function(){return ct.RGB({R:this.R,G:this.G,B:this.B},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"RGBA",{get:function(){return ct.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSL",{get:function(){return ct.HSL({H:this.H,S:this.S,L:this.L},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HSLA",{get:function(){return ct.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELab",{get:function(){return ct.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CIELabA",{get:function(){return ct.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYK",{get:function(){return ct.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"CMYKA",{get:function(){return ct.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)},enumerable:!1,configurable:!0}),n.toHEXObject=function(t){var e=Et(t);return Mt(t,e,0,Lt.HEX)},n.toHEX=function(t){return ct.HEX(n.toHEXObject(t))},n.toHEXAObject=function(t){var e=Et(t);return Mt(t,e,0,Lt.HEXA)},n.toHEXA=function(t){return ct.HEX(n.toHEXAObject(t))},n.toRGBObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.RGB)},n.toRGB=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.RGB);return ct.RGB(i,r)},n.toRGBAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.RGBA)},n.toRGBA=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.RGBA);return ct.RGB(i,r)},n.toHSLObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.HSL)},n.toHSL=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.HSL);return ct.HSL(i,r)},n.toHSLAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.HSLA)},n.toHSLA=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.HSLA);return ct.HSL(i,r)},n.toCIELabObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.CIELab)},n.toCIELab=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.CIELab);return ct.CIELab(i,r)},n.toCIELabAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.CIELabA)},n.toCIELabA=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.CIELabA);return ct.CIELab(i,r)},n.toCMYKObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.CMYK)},n.toCMYK=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.CMYK);return ct.CMYK(i,r)},n.toCMYKAObject=function(t,e){void 0===e&&(e={});var n=Et(t);return Mt(t,n,e.decimals,Lt.CMYKA)},n.toCMYKA=function(t,e){void 0===e&&(e={});var n=Et(t),r=U(e,t),i=Mt(t,n,6,Lt.CMYKA);return ct.CMYK(i,r)},n.getBlendHEXObject=function(t,e,n){return void 0===n&&(n=5),It(t,e,n,0,Lt.HEX)},n.getBlendHEX=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXObject(t,e,r).map((function(t){return ct.HEX(t)}))},n.getBlendHEXAObject=function(t,e,n){return void 0===n&&(n=5),It(t,e,n,0,Lt.HEXA)},n.getBlendHEXA=function(t,e,r){return void 0===r&&(r=5),n.getBlendHEXAObject(t,e,r).map((function(t){return ct.HEX(t)}))},n.getBlendRGBObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,r.decimals,Lt.RGB)},n.getBlendRGB=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,6,Lt.RGB).map((function(n){return ct.RGB(n,U(r,t,e))}))},n.getBlendRGBAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,r.decimals,Lt.RGBA)},n.getBlendRGBA=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,6,Lt.RGBA).map((function(n){return ct.RGB(n,U(r,t,e))}))},n.getBlendHSLObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,r.decimals,Lt.HSL)},n.getBlendHSL=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=U(r,t,e);return It(t,e,n,6,Lt.HSL).map((function(t){return ct.HSL(t,i)}))},n.getBlendHSLAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,r.decimals,Lt.HSLA)},n.getBlendHSLA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=U(r,t,e);return It(t,e,n,6,Lt.HSLA).map((function(t){return ct.HSL(t,i)}))},n.getBlendCIELabObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,r.decimals,Lt.CIELab)},n.getBlendCIELab=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=U(r,t,e);return It(t,e,n,6,Lt.CIELab).map((function(t){return ct.CIELab(t,i)}))},n.getBlendCIELabAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),It(t,e,n,r.decimals,Lt.CIELabA)},n.getBlendCIELabA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=U(r,t,e);return It(t,e,n,6,Lt.CIELabA).map((function(t){return ct.CIELab(t,i)}))},n.getMixHEXObject=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),Bt.HEX(t,e,!1)},n.getMixHEX=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),Bt.HEX(t,e,!0)},n.getMixHEXAObject=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),Bt.HEXA(t,e,!1)},n.getMixHEXA=function(t,e){return void 0===e&&(e=exports.Mix.ADDITIVE),Bt.HEXA(t,e,!0)},n.getMixRGBObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.RGB(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixRGB=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.RGB(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixRGBAObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.RGBA(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixRGBA=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.RGBA(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixHSLObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.HSL(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixHSL=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.HSL(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixHSLAObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.HSLA(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixHSLA=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.HSLA(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixCIELabObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.CIELab(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixCIELab=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.CIELab(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getMixCIELabAObject=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.CIELabA(t,n,!1,U.apply(void 0,e([r],t,!1)))},n.getMixCIELabA=function(t,n,r){return void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),Bt.CIELabA(t,n,!0,U.apply(void 0,e([r],t,!1)))},n.getShades=function(t,e,n){return void 0===n&&(n={}),vt(t,e,!0,U(n,t))},n.getTints=function(t,e,n){return void 0===n&&(n={}),vt(t,e,!1,U(n,t))},n.getHarmony=function(t,e,n,r){return void 0===e&&(e=exports.Harmony.COMPLEMENTARY),void 0===n&&(n=exports.Mix.ADDITIVE),void 0===r&&(r={}),function(t,e,n,r){var i;return(i={},i[exports.Harmony.ANALOGOUS]=yt.buildHarmony(e,lt,n,r),i[exports.Harmony.COMPLEMENTARY]=yt.buildHarmony(e,ft,n,r),i[exports.Harmony.SPLIT_COMPLEMENTARY]=yt.buildHarmony(e,pt,n,r),i[exports.Harmony.TRIADIC]=yt.buildHarmony(e,ht,n,r),i[exports.Harmony.TETRADIC]=yt.buildHarmony(e,bt,n,r),i[exports.Harmony.SQUARE]=yt.buildHarmony(e,At,n,r),i)[t]}(e,t,n,U(r,t))},n}();exports.ColorTranslator=Gt;
{
"name": "colortranslator",
"version": "3.0.2",
"version": "4.0.0",
"description": "A JavaScript library, written in TypeScript, to convert among different color models",

@@ -27,2 +27,3 @@ "main": "index.js",

"scripts": {
"test:ts": "tsc --noEmit",
"test": "jest --verbose",

@@ -68,30 +69,30 @@ "lint": "eslint \"src/**/*.{js,ts}\" \"tests/**/*.ts\"",

"devDependencies": {
"@types/jest": "^29.5.3",
"@types/node": "^20.4.2",
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"@types/jest": "^29.5.10",
"@types/node": "^20.10.0",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"eslint": "^8.45.0",
"eslint": "^8.54.0",
"google-code-prettify": "^1.0.5",
"html-webpack-plugin": "^5.5.3",
"jest": "^29.6.1",
"jest": "^29.7.0",
"mini-css-extract-plugin": "^2.7.6",
"node-sass": "^9.0.0",
"plop": "^3.1.2",
"rimraf": "^5.0.1",
"rollup": "^3.26.3",
"plop": "^4.0.0",
"rimraf": "^5.0.5",
"rollup": "^4.5.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-ts": "^3.2.0",
"rollup-plugin-ts": "^3.4.5",
"sass-loader": "^13.3.2",
"style-loader": "^3.3.3",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
"ts-loader": "^9.5.1",
"typescript": "^5.3.2",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
"whatwg-fetch": "^3.6.16"
"whatwg-fetch": "^3.6.19"
}
}

@@ -88,3 +88,6 @@ <p align="center">

> **Note:** The conversion to a CMYK color is made taking a random value of black as a base (in this case, taking the greater value from red, green or blue). When a value of black is assumed, the rest of the colors can be calculated from it. The result will be visually similar to the original light color, but if you try to convert it back you will not obtain the same original value.
> **Notes:**
>
>* The conversion to a CMYK color is made taking a random value of black as a base (in this case, taking the greater value from red, green or blue). When a value of black is assumed, the rest of the colors can be calculated from it. The result will be visually similar to the original light color, but if you try to convert it back you will not obtain the same original value.
> * The conversion to a CIE L\*a\*b color may introduce a small amount of rounding error, as far as you maintain enough decimals for the calculation it should not be noticeable, but you can expect that the values change some of their decimals during the conversions.

@@ -125,2 +128,8 @@ #### Input

| `hsla(300, 100%, 50%, 0.5)` | Functional HSL notation with alpha (CSS Colors 3 comma-separated) |
| `lab(54 81 70)` | Functional LAB notation with numbers |
| `lab(54 81 70 / 1)` | Functional LAB notation with numbers and alpha |
| `lab(54% 65% 56%)` | Functional LAB notation with percentages |
| `lab(54% 65% 56% / 1)` | Functional LAB notation with percentages and alpha |
| `lab(54 81 70 / 93%)` | Functional LAB notation with numbers and alpha in percentages |
| `lab(54% 65% 56% / 93%)` | Functional LAB notation with parcentages and alpha in percentages |
| `device-cmyk(0% 100% 100% 0%)` | Device-dependent functional CMYK notation with percentages |

@@ -152,14 +161,18 @@ | `device-cmyk(0% 100% 100% 0% / 1)` | Device-dependent functional CMYK notation with percentages and alpha |

| ---------------------------------------------- | ----------------------------------------- |
| `{r: "0xFF", g: "0x00", b: "0xFF"}` | Hexadecimal color |
| `{r: "0xF", g: "0x0", b: "0xF"}` | Shorthand hexadecimal color |
| `{r: "0xFF", g: "0x00", b: "0xFF", a: "0x80"}` | Hexadecimal color with alpha |
| `{r: "0xF", g: "0x0", b: "0xF", a: "0xF"}` | Shorthand hexadecimal color with alpha |
| `{r: 255, g: 0, b: 255}` | RGB notation |
| `{r: 255, g: 0, b: 255, a: 0.5}` | RGB notation with alpha |
| `{h: 300, s: "100%", l: "50%"}` | HSL notation using percentages |
| `{h: 300, s: 100, l: 50}` | HSL notation using numbers |
| `{h: 300, s: "100%", l: "50%", a: 0.5}` | HSL notation with alpha using percentages |
| `{h: 300, s: 100, l: 50, a: 0.5}` | HSL notation with alpha using numbers |
| `{c: "0%", m: "100%", y: "100%", k: "0%"}` | CMYK notation using percentages |
| `{c: 0, m: 1, y: 1, k: 0}` | CMYK notation using numbers |
| `{R: "0xFF", G: "0x00", B: "0xFF"}` | Hexadecimal color |
| `{R: "0xF", G: "0x0", B: "0xF"}` | Shorthand hexadecimal color |
| `{R: "0xFF", G: "0x00", B: "0xFF", A: "0x80"}` | Hexadecimal color with alpha |
| `{R: "0xF", G: "0x0", G: "0xF", G: "0xF"}` | Shorthand hexadecimal color with alpha |
| `{R: 255, G: 0, B: 255}` | RGB notation |
| `{R: 255, G: 0, G: 255, A: 0.5}` | RGB notation with alpha |
| `{H: 300, S: "100%", L: "50%"}` | HSL notation using percentages |
| `{H: 300, S: 100, L: 50}` | HSL notation using numbers |
| `{H: 300, S: "100%", L: "50%", A: 0.5}` | HSL notation with alpha using percentages |
| `{H: 300, S: 100, L: 50, A: 0.5}` | HSL notation with alpha using numbers |
| `{L: 54, a: 81, b: 70}` | LAB notation using numbers |
| `{L: 54, a: 81, b: 70, A: 1}` | LAB notation using numbers with alpha |
| `{L: '54%', a: '65%', b: '56%'}` | LAB notation using percentages |
| `{L: '54%', a: '65%', b: '56%', A: '100%'}` | LAB notation using percentages with alpha |
| `{C: "0%", M: "100%", Y: "100%", K: "0%"}` | CMYK notation using percentages |
| `{C: 0, M: 1, Y: 1, K: 0}` | CMYK notation using numbers |

@@ -183,2 +196,3 @@ #### Class instantiation

rgbUnit?: 'none' | 'percent'; // defaults to 'none'
labUnit?: 'none' | 'percent'; // defaults to 'none'
cmykUnit?: 'none' | 'percent'; // defaults to 'percent'

@@ -197,2 +211,3 @@ alphaUnit?: 'none' | 'percent'; // defaults to 'none'

| rgbUnit | yes | This option only takes place if the output is an RGB CSS output. It sets the color units of the RGB and RGBA CSS outputs. If `none` is used the color values will be decimal between `0` and `255`. If `percent` is used, the color values will be decimal with percentages between `0%` and `100%`. |
| labUnit | yes | This option only takes place if the output is a `CIE L*a*b` CSS output. It sets the color units of the `CIELab` and `CIELabA` CSS outputs. If `none` is used it will be a decimal number between `0` and `100` for the `CIE Lightness` and a decimal number between `-125` and `125` for the `a` and `b` axis of the `CIE L*a*b` colorspace. If `percent` is used, it will be a decimal number between `0` and `100` with percentages for all the color values. |
| cmykUnit | yes | This option sets the color units of the CMYK and CMYKA CSS outputs. If `none` is used the color values will be decimal between `0` and `1`. If `percent` is used, the color values will be decimal with percentages between `0%` and `100%`. |

@@ -207,3 +222,4 @@ | alphaUnit | yes | This option only takes place if the output is a CSS Level 4 output (`legacyCSS` has not been set, or it has been set to `false` or it has been autodetected as `false`). This option sets the alpha units of the CSS Level 4 outputs. If `none` is used the alpha values will be decimal between `0` and `1`. If `percent` is used, the alpha values will be decimal with percentages between `0%` and `100%`. |

> * `anglesUnit`: if this option is set, then its value prevails, if it is not set, and the HSL CSS input is provided with an angle unit, then it will take that value, otherwise it will use the default one wich is `none`.
> * `rgbUnit`: if this option is set, then its value prevails, if it is not set, and the RGB CSS input is provided with percentages in its color values, then it will take the `pcent` value, otherwise it will use the default one wich is `none`.
> * `rgbUnit`: if this option is set, then its value prevails, if it is not set, and the RGB CSS input is provided with percentages in its color values, then it will take the `percent` value, otherwise it will use the default one wich is `none`.
> * `labUnit`: if this option is set, then its value prevails, if it is not set, and the CIE L\*a\*b CSS input is provided with percentages in its color values, then it will take the `percent` value, otherwise it will use the default one wich is `none`.
> * `cmykUnit`: if this option is set, then its value prevails, if it is not set, and the CMYK CSS input is provided without percentages in its color values, then it will take the `none` value, otherwise it will use the default one wich is `percent`.

@@ -224,5 +240,7 @@ > * `alphaUnit`: if this option is set, then its value prevails, if it is not set, and the CSS input (must be CSS Level 4) is provided with percentages in its alpha value, then it will take the `percent` value, otherwise it will use the default one wich is `none`.

const hsla = new ColorTranslator({ r: 115, g: 200, b: 150, a: 0.5 });
const lab = new ColorTranslator('lab(54 81 70)');
const cmyk = new ColorTranslator({ c: 100, m: 100, y: 0, k: 0 });
const hsla = new ColorTranslator({ R: 115, G: 200, B: 150, A: 0.5 });
const cmyk = new ColorTranslator({ C: 100, M: 100, Y: 0, K: 0 });
```

@@ -237,3 +255,3 @@

new ColorTranslator('#F43227', { decimals: 0 }).HSL; // hsl(3 90% 55%)
new ColorTranslator('#F43227', { decimals: 2 }).HSLObject; // {h: 3.22, s: 90.31, l: 55.49}
new ColorTranslator('#F43227', { decimals: 2 }).HSLObject; // {H: 3.22, S: 90.31, L: 55.49}

@@ -269,2 +287,9 @@ // legacyCSS

// labUnit
new ColorTranslator('#0F0').CIELab; // lab(87.818128 -79.287281 80.990256)
new ColorTranslator('#0F0', { labUnit: 'none' }).CIELab; // lab(87.818128 -79.287281 80.990256)
new ColorTranslator('#0F0', { labUnit: 'percent' }).CIELab; // lab(87.818128% -63.429825% 64.792205%)
new ColorTranslator('lab(88 -79 81)').CIELabA; // lab(87.863151 -78.89437 80.892902 / 1)
new ColorTranslator('lab(54.291734% 64.649964% 55.908032% / 1)').CIELabA; // lab(54.291736% 64.649953% 55.90801% / 1)
// cmykUnit

@@ -290,18 +315,21 @@ new ColorTranslator('#0F0').CMYK; // device-cmyk(100% 0% 100% 0%)

There are 12 chainable public methods and 11 of them accept a number as input. The last one accepts an [options object](#options-object):
There are 15 chainable public methods and 14 of them accept a number as input. The last one accepts an [options object](#options-object):
| Public methods | Input | Description |
| -------------- | --------------- | -------------------------------------------------------- |
| setH | 0 ≤ input ≤ 360 | Sets the color hue |
| setS | 0 ≤ input ≤ 100 | Sets the color saturation percentage |
| setL | 0 ≤ input ≤ 100 | Sets the color lightness percentage |
| setR | 0 ≤ input ≤ 255 | Sets the red value of the color |
| setG | 0 ≤ input ≤ 255 | Sets the green value of the color |
| setB | 0 ≤ input ≤ 255 | Sets the blue value of the color |
| setC | 0 ≤ input ≤ 100 | Sets the CMYK cyan percentage value of the color |
| setM | 0 ≤ input ≤ 100 | Sets the CMYK magenta percentage value of the color |
| setY | 0 ≤ input ≤ 100 | Sets the CMYK yellow percentage value of the color |
| setK | 0 ≤ input ≤ 100 | Sets the CMYK black percentage value of the color |
| setA | 0 ≤ input ≤ 1 | Sets the alpha value of the color |
| setOptions | Options | Sets an object that would work as configuration options |
| Public methods | Input | Description |
| -------------- | ------------------ | -------------------------------------------------------- |
| setH | 0 ≤ input ≤ 360 | Sets the color hue |
| setS | 0 ≤ input ≤ 100 | Sets the color saturation percentage |
| setL | 0 ≤ input ≤ 100 | Sets the color lightness percentage |
| setR | 0 ≤ input ≤ 255 | Sets the red value of the color |
| setG | 0 ≤ input ≤ 255 | Sets the green value of the color |
| setB | 0 ≤ input ≤ 255 | Sets the blue value of the color |
| setC | 0 ≤ input ≤ 100 | Sets the CMYK cyan percentage value of the color |
| setM | 0 ≤ input ≤ 100 | Sets the CMYK magenta percentage value of the color |
| setY | 0 ≤ input ≤ 100 | Sets the CMYK yellow percentage value of the color |
| setK | 0 ≤ input ≤ 100 | Sets the CMYK black percentage value of the color |
| setCIEL | 0 ≤ input ≤ 100 | Sets the CIE Lightness value of the color |
| setCIEa | -125 ≤ input ≤ 125 | Sets the `a` axis in the CIE L\*a\*b colorspace |
| setCIEb | -125 ≤ input ≤ 125 | Sets the `b` axis in the CIE L\*a\*b colorspace |
| setA | 0 ≤ input ≤ 1 | Sets the alpha value of the color |
| setOptions | Options | Sets an object that would work as configuration options |

@@ -328,42 +356,52 @@ ###### Class public methods examples

There are 7 properties to get the CSS representation of the color:
There are 10 properties to get the CSS representation of the color:
| Property | Description |
| -------- | ---------------------------------------------------- |
| HEX | Gets the the object hex representation of the color |
| HEXA | Gets the the object hexa representation of the color |
| RGB | Gets the the object rgb representation of the color |
| RGBA | Gets the the object rgba representation of the color |
| HSL | Gets the the object hsl representation of the color |
| HSLA | Gets the the object hsla representation of the color |
| CMYK | Gets the the object cmyk representation of the color |
| Property | Description |
| -------- | --------------------------------------------------------------- |
| HEX | Gets the css hex representation of the color |
| HEXA | Gets the css hex representation of the color with alpha |
| RGB | Gets the css rgb representation of the color |
| RGBA | Gets the css rgb representation of the color with alpha |
| HSL | Gets the css hsl representation of the color |
| HSLA | Gets the css hsl representation of the color with alpha |
| CIELab | Gets the css CIE L\*a\*b representation of the color |
| CIELabA | Gets the css CIE L\*a\*b representation of the color with alpha |
| CMYK | Gets css cmyk representation of the color |
| CMYKA | Gets css cmyk representation of the color with alpha |
There are 7 properties to get the object representation of the color:
There are 10 properties to get the object representation of the color:
| Property | Description |
| ---------- | ---------------------------------------------------- |
| HEXObject | Gets the the object hex representation of the color |
| HEXAObject | Gets the the object hexa representation of the color |
| RGBObject | Gets the the object rgb representation of the color |
| RGBAObject | Gets the the object rgba representation of the color |
| HSLObject | Gets the the object hsl representation of the color |
| HSLAObject | Gets the the object hsla representation of the color |
| CMYKObject | Gets the the object cmyk representation of the color |
| Property | Description |
| ------------- | ----------------------------------------------------------------- |
| HEXObject | Gets the object hex representation of the color |
| HEXAObject | Gets the object hex representation of the color with alpha |
| RGBObject | Gets the object rgb representation of the color |
| RGBAObject | Gets the object rgb representation of the color with alpha |
| HSLObject | Gets the object hsl representation of the color |
| HSLAObject | Gets the object hsl representation of the color with alpha |
| CIELabObject | Gets the object CIE L\*a\*b representation of the color |
| CIELabAObject |Gets the object CIE L\*a\*b representation of the color with alpha |
| CMYKObject | Gets the object cmyk representation of the color |
| CMYKAObject | Gets the object cmyk representation of the color with alpha |
There are 11 properties to get the individual color values:
| Property | Description |
| -------- | --------------------------------------------------- |
| H | Gets the color hue |
| S | Gets the color saturation percentage |
| L | Gets the color lightness percentage |
| R | Gets the red value of the color |
| G | Gets the green value of the color |
| B | Gets the blue value of the color |
| C | Gets the CMYK cyan percentage value of the color |
| M | Gets the CMYK magenta percentage value of the color |
| Y | Gets the CMYK yellow percentage value of the color |
| K | Gets the CMYK black percentage value of the color |
| A | Gets the alpha value of the color |
There are 14 properties to get the individual color values:
| Property | Description |
| -------- | ------------------------------------------------------------ |
| H | Gets the color hue |
| S | Gets the color saturation percentage |
| L | Gets the color lightness percentage |
| R | Gets the red value of the color |
| G | Gets the green value of the color |
| B | Gets the blue value of the color |
| CIEL | Gets the CIE Lightness value of the color |
| CIEa | Gets the `a` axis in the CIE L\*a\*b colorspace of the color |
| CIEb | Gets the `b` axis in the CIE L\*a\*b colorspace of the color |
| C | Gets the CMYK cyan percentage value of the color |
| M | Gets the CMYK magenta percentage value of the color |
| Y | Gets the CMYK yellow percentage value of the color |
| K | Gets the CMYK black percentage value of the color |
| A | Gets the alpha value of the color |
And a property to get the options object that acts as a [configuration object](#options-object) for the outputs

@@ -388,2 +426,3 @@

color.HSLA; // hsl(300 100% 50% / 1)
color.CIELabObject; // {L: 60.17, a: 93.55, b: -60.5}
color.options; // { decimals: 2 }

@@ -396,3 +435,3 @@ ```

There are 43 static methods available, 16 of them to convert colors, 12 to create color blends, 12 to mix colors, one to get shades, one to get tints, and one to create color harmonies.
There are 56 static methods available, 20 of them to convert colors, 16 to create color blends, 16 to mix colors, one to get shades, one to get tints, and one to create color harmonies.

@@ -413,18 +452,24 @@ >Note: The static methods also count with the options-autodetection feature that was explained in the [options object section](#options-object), but in this case it scans all the inputs that are CSS, and it tries to detect the options in each one of them. If one of the autodetected options is consistent in all the inputs, then it takes the autodetected value, otherwise it will use the default one.

| Static method | Description |
| ------------- | --------------------------------------------------------- |
| toHEX | Converts to an hexadecimal notation |
| toHEXObject | Converts to an object in hexadecimal notation |
| toHEXA | Converts to an hexadecimal notation with alpha |
| toHEXAObject | Converts to an object in hexadecimal notation with alpha |
| toRGB | Converts to an RGB notation |
| toRGBObject | Converts to an object in RGB notation |
| toRGBA | Converts to an RGB notation with alpha |
| toRGBAObject | Converts to an object in RGB notation with alpha |
| toHSL | Converts to an HSL notation |
| toHSLObject | Converts to an object in HSL notation |
| toHSLA | Converts to an HSL notation with alpha |
| toHSLAObject | Converts to an object in HSL notation with alpha |
| toCMYK | Converts to a CMYK notation |
| toCMYKObject | Converts to an object in CMYK notation |
| Static method | Description |
| --------------- | ------------------------------------------------------------ |
| toHEX | Converts to an hexadecimal notation |
| toHEXObject | Converts to an object in hexadecimal notation |
| toHEXA | Converts to an hexadecimal notation with alpha |
| toHEXAObject | Converts to an object in hexadecimal notation with alpha |
| toRGB | Converts to an RGB notation |
| toRGBObject | Converts to an object in RGB notation |
| toRGBA | Converts to an RGB notation with alpha |
| toRGBAObject | Converts to an object in RGB notation with alpha |
| toHSL | Converts to an HSL notation |
| toHSLObject | Converts to an object in HSL notation |
| toHSLA | Converts to an HSL notation with alpha |
| toHSLAObject | Converts to an object in HSL notation with alpha |
| toCIELab | Converts to a CIE L\*a\*b notation |
| toCIELabObject | Converts to an object in the CIE L\*a\*b notation |
| toCIELabA | Converts to a CIE L\*a\*b notation with alpha |
| toCIELabAObject | Converts to an object in the CIE L\*a\*b notation with alpha |
| toCMYK | Converts to a CMYK notation |
| toCMYKA | Converts to a CMYK notation with alpha |
| toCMYKObject | Converts to an object in CMYK notation |
| toCMYKAObject | Converts to an object in CMYK notation with alpha |

@@ -447,3 +492,3 @@ ###### Color conversion static methods examples

ColorTranslator.toCMYKObject('#F0F'); // {c: 0, m: 100, y: 0, k: 0}
ColorTranslator.toCMYKObject('#F0F'); // {C: 0, M: 100, Y: 0, K: 0}

@@ -466,5 +511,10 @@ ColorTranslator.toCMYK('#F0F'); // cmyk(0% 100% 0% 0%)

); // hsl(7.9518 77.5701% 20.9804% / 0.7071)
ColorTranslator.toCIELab(
'#00F',
{ decimals: 2 }
); // lab(29.57 68.3 -112.03)
```
You can also consult the [demo 3](https://elchininet.github.io/ColorTranslator/#demo3), and the [demo 4](https://elchininet.github.io/ColorTranslator/#demo4) to check the use of these static methods.
You can also consult the [demo 3](https://elchininet.github.io/ColorTranslator/#demo3), the [demo 4](https://elchininet.github.io/ColorTranslator/#demo4) and the [demo 5](https://elchininet.github.io/ColorTranslator/#demo5) to check the use of these static methods.

@@ -486,16 +536,20 @@ ###### Color blends static methods

| Static method | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------- |
| getBlendHEX | Creates an array relative to the blend between two colors in hexadecimal notation |
| getBlendHEXObject | Creates an array of objects relative to the blend between two colors in hexadecimal notation |
| getBlendHEXA | Creates an array relative to the blend between two colors in hexadecimal notation with alpha |
| getBlendHEXAObject | Creates an array of objects relative to the blend between two colors in hexadecimal notation with alpha |
| getBlendRGB | Creates an array relative to the blend between two colors in RGB notation |
| getBlendRGBObject | Creates an array of objects relative to the blend between two colors in RGB notation |
| getBlendRGBA | Creates an array relative to the blend between two colors in RGB notation with alpha |
| getBlendRGBAObject | Creates an array of objects relative to the blend between two colors in RGB notation with alpha |
| getBlendHSL | Creates an array relative to the blend between two colors in HSL notation |
| getBlendHSLObject | Creates an array of objects relative to the blend between two colors in HSL notation |
| getBlendHSLA | Creates an array relative to the blend between two colors in HSL notation with alpha |
| getBlendHSLAObject | Creates an array of objects relative to the blend between two colors in HSL notation with alpha |
| Static method | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------- |
| getBlendHEX | Creates an array relative to the blend between two colors in hexadecimal notation |
| getBlendHEXObject | Creates an array of objects relative to the blend between two colors in hexadecimal notation |
| getBlendHEXA | Creates an array relative to the blend between two colors in hexadecimal notation with alpha |
| getBlendHEXAObject | Creates an array of objects relative to the blend between two colors in hexadecimal notation with alpha |
| getBlendRGB | Creates an array relative to the blend between two colors in RGB notation |
| getBlendRGBObject | Creates an array of objects relative to the blend between two colors in RGB notation |
| getBlendRGBA | Creates an array relative to the blend between two colors in RGB notation with alpha |
| getBlendRGBAObject | Creates an array of objects relative to the blend between two colors in RGB notation with alpha |
| getBlendHSL | Creates an array relative to the blend between two colors in HSL notation |
| getBlendHSLObject | Creates an array of objects relative to the blend between two colors in HSL notation |
| getBlendHSLA | Creates an array relative to the blend between two colors in HSL notation with alpha |
| getBlendHSLAObject | Creates an array of objects relative to the blend between two colors in HSL notation with alpha |
| getBlendCIELab | Creates an array relative to the blend between two colors in CIE L\*a\*b notation |
| getBlendCIELabObject | Creates an array of objects relative to the blend between two colors in CIE L\*a\*b notation |
| getBlendCIELabA | Creates an array relative to the blend between two colors in CIE L\*a\*b notation with alpha |
| getBlendCIELabAObject | Creates an array of objects relative to the blend between two colors in CIE L\*a\*b notation with alpha |

@@ -526,11 +580,11 @@ ###### Color blends static methods examples

// [
// {r: 255, g: 0, b: 0, a: 0},
// {r: 191.25, g: 0, b: 63.75, a: 0.25},
// {r: 127.5, g: 0, b: 127.5, a: 0.5},
// {r: 63.75, g: 0, b: 191.25, a: 0.75},
// {r: 0, g: 0, b: 255, a: 1}
// {R: 255, G: 0, B: 0, A: 0},
// {R: 191.25, G: 0, B: 63.75, A: 0.25},
// {R: 127.5, G: 0, B: 127.5, A: 0.5},
// {R: 63.75, G: 0, B: 191.25, A: 0.75},
// {R: 0, G: 0, B: 255, A: 1}
// ]
```
You can also consult the [demo 5](https://elchininet.github.io/ColorTranslator/#demo5) to check the use of these static methods.
You can also consult the [demo 6](https://elchininet.github.io/ColorTranslator/#demo6) to check the use of these static methods.

@@ -553,16 +607,20 @@ ###### Color mix static methods

| Static method | Description |
| ---------------- | -------------------------------------------------------------------------------- |
| getMixHEX | Gets the mix of the input colors in hexadecimal notation |
| getMixHEXObject | Gets the mix of the input colors in an object in hexadecimal notation |
| getMixHEXA | Gets the mix of the input colors in hexadecimal notation with alpha |
| getMixHEXAObject | Gets the mix of the input colors in an object in hexadecimal notation with alpha |
| getMixRGB | Gets the mix of the input colors in RGB notation |
| getMixRGBObject | Gets the mix of the input colors in an object in RGB notation |
| getMixRGBA | Gets the mix of the input colors in RGB notation with alpha |
| getMixRGBAObject | Gets the mix of the input colors in an object in RGB notation with alpha |
| getMixHSL | Gets the mix of the input colors in HSL notation |
| getMixHSLObject | Gets the mix of the input colors in an object in HSL notation |
| getMixHSLA | Gets the mix of the input colors in HSL notation with alpha |
| getMixHSLAObject | Gets the mix of the input colors in an object in HSL notation with alpha |
| Static method | Description |
| ------------------- | -------------------------------------------------------------------------------------- |
| getMixHEX | Gets the mix of the input colors in hexadecimal notation |
| getMixHEXObject | Gets the mix of the input colors in an object in hexadecimal notation |
| getMixHEXA | Gets the mix of the input colors in hexadecimal notation with alpha |
| getMixHEXAObject | Gets the mix of the input colors in an object in hexadecimal notation with alpha |
| getMixRGB | Gets the mix of the input colors in RGB notation |
| getMixRGBObject | Gets the mix of the input colors in an object in RGB notation |
| getMixRGBA | Gets the mix of the input colors in RGB notation with alpha |
| getMixRGBAObject | Gets the mix of the input colors in an object in RGB notation with alpha |
| getMixHSL | Gets the mix of the input colors in HSL notation |
| getMixHSLObject | Gets the mix of the input colors in an object in HSL notation |
| getMixHSLA | Gets the mix of the input colors in HSL notation with alpha |
| getMixHSLAObject | Gets the mix of the input colors in an object in HSL notation with alpha |
| getMixCIELab | Gets the mix of the input colors in CIE L\*a\*b color notation |
| getMixCIELabObject | Gets the mix of the input colors in an object in CIE L\*a\*b color notation |
| getMixCIELabA | Gets the mix of the input colors in CIE L\*a\*b color notation with alpha |
| getMixCIELabAObject | Gets the mix of the input colors in an object in CIE L\*a\*b color notation with alpha |

@@ -582,3 +640,3 @@ ###### Color mix static methods examples

// { r: '0xFF', g: '0x00', b: '0xFF', a: '0xFF' }
// { R: '0xFF', G: '0x00', B: '0xFF', A: '0xFF' }

@@ -590,3 +648,3 @@ ColorTranslator.getMixHEX(['#FF0', '#F00'], Mix.SUBTRACTIVE);

You can also consult the [demo 7](https://elchininet.github.io/ColorTranslator/#demo7) and [demo 8](https://elchininet.github.io/ColorTranslator/#demo8) to check the use of these static methods.
You can also consult the [demo 8](https://elchininet.github.io/ColorTranslator/#demo8) and [demo 9](https://elchininet.github.io/ColorTranslator/#demo9) to check the use of these static methods.

@@ -635,11 +693,11 @@ ###### Color shades and color tints static methods

// [
// {r: 255, g: 42.5, b: 42.5, a: 0.5},
// {r: 255, g: 85, b: 85, a: 0.5},
// {r: 255, g: 127.5, b: 127.5, a: 0.5},
// {r: 255, g: 170, b: 170, a: 0.5},
// {r: 255, g: 212.5, b: 212.5, a: 0.5}
// {R: 255, G: 42.5, B: 42.5, A: 0.5},
// {R: 255, G: 85, B: 85, A: 0.5},
// {R: 255, G: 127.5, B: 127.5, A: 0.5},
// {R: 255, G: 170, B: 170, A: 0.5},
// {R: 255, G: 212.5, B: 212.5, A: 0.5}
// ]
```
You can also consult the [demo 6](https://elchininet.github.io/ColorTranslator/#demo6) to check the use of these static methods.
You can also consult the [demo 7](https://elchininet.github.io/ColorTranslator/#demo7) to check the use of these static methods.

@@ -699,4 +757,4 @@ ###### Color harmonies static method

// [
// {r: 115, g: 200, b: 150, a: 0.5},
// {r: 200, g: 123.75, b: 115, a: 0.5}
// {R: 115, G: 200, B: 150, A: 0.5},
// {R: 200, G: 123.75, B: 115, A: 0.5}
// ]

@@ -710,3 +768,3 @@

You can also consult the [demo 9](https://elchininet.github.io/ColorTranslator/#demo9) and [demo 10](https://elchininet.github.io/ColorTranslator/#demo10) to check the use of this static method.
You can also consult the [demo 10](https://elchininet.github.io/ColorTranslator/#demo10) and [demo 11](https://elchininet.github.io/ColorTranslator/#demo11) to check the use of this static method.

@@ -736,10 +794,10 @@ ## TypeScript Support

This type is returned by the `HEXObject`, and `HEXAObject` properties, the `toHEXObject`, `toHEXAObject`, `getBlendHEXObject`, `getBlendHEXAObject`, `getMixHEXObject`, and the `getMixHEXAObject` methods, and the `getHarmony` method (when the input is an `HEXObject`).
This type is returned by the `HEXObject`, and `HEXAObject` properties, the `toHEXObject`, `toHEXAObject`, `getBlendHEXObject`, `getBlendHEXAObject`, `getMixHEXObject`, and the `getMixHEXAObject` methods, and the `getShades`, `getTints`, and `getHarmony` methods (when the input is an `HEXObject`).
```typescript
interface HEXObject {
r: string;
g: string;
b: string;
a?: string;
R: string;
G: string;
B: string;
A?: string;
}

@@ -750,10 +808,10 @@ ```

This type is returned by the `RGBObject`, and `RGBAObject` properties, the `toRGBObject`, `toRGBAObject`, `getBlendRGBObject`, `getBlendRGBAObject`, `getMixRGBObject`, and the `getMixRGBAObject` methods, and the `getHarmony` method (when the input is an `RGBObject`).
This type is returned by the `RGBObject`, and `RGBAObject` properties, the `toRGBObject`, `toRGBAObject`, `getBlendRGBObject`, `getBlendRGBAObject`, `getMixRGBObject`, and the `getMixRGBAObject` methods, and the `getShades`, `getTints`, and `getHarmony` methods (when the input is an `RGBObject`).
```typescript
interface RGBObject {
r: number;
g: number;
b: number;
a?: number;
R: number;
G: number;
B: number;
A?: number;
}

@@ -764,13 +822,26 @@ ```

This type is returned by the `HSLObject`, and `HSLAObject` properties, the `toHSLObject`, `toHSLAObject`, `getBlendHSLObject`, `getBlendHSLAObject`, `getMixHSLObject`, and the `getMixHSLAObject` methods, and the `getHarmony` method (when the input is an `HSLObject`).
This type is returned by the `HSLObject`, and `HSLAObject` properties, the `toHSLObject`, `toHSLAObject`, `getBlendHSLObject`, `getBlendHSLAObject`, `getMixHSLObject`, and the `getMixHSLAObject` methods, and the `getShades`, `getTints`, and `getHarmony` methods (when the input is an `HSLObject`).
```typescript
interface HSLObject {
h: number;
s: number;
l: number;
a?: number;
H: number;
S: number;
L: number;
A?: number;
}
```
###### CIELabObject
This type is returned by the `CIELabObject`, and `CIELabAObject` properties, the `toCIELabObject`, `toCIELabAObject`, `getBlendCIELabObject`, `getBlendCIELabAObject`, `getMixCIELabObject`, and the `getMixCIELabAObject` methods, and the `getShades`, `getTints`, and `getHarmony` methods (when the input is an `CIELabObject`).
```typescript
interface CIELabObject {
L: number;
a: number;
b: number;
A?: number;
}
```
###### CMYKObject

@@ -782,7 +853,7 @@

interface CMYKObject {
c: number;
m: number;
y: number;
k: number;
C: number;
M: number;
Y: number;
K: number;
}
```

@@ -1,1 +0,1 @@

var colortranslator=function(t){"use strict";var e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};function n(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var r,i,o,a;!function(t){t.HEX="HEX",t.RGB="RGB",t.HSL="HSL",t.CMYK="CMYK"}(r||(r={})),t.Harmony=void 0,(i=t.Harmony||(t.Harmony={})).ANALOGOUS="ANALOGOUS",i.COMPLEMENTARY="COMPLEMENTARY",i.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",i.TRIADIC="TRIADIC",i.TETRADIC="TETRADIC",i.SQUARE="SQUARE",t.Mix=void 0,(o=t.Mix||(t.Mix={})).ADDITIVE="ADDITIVE",o.SUBTRACTIVE="SUBTRACTIVE",function(t){t.black="#000000",t.silver="#C0C0C0",t.gray="#808080",t.white="#FFFFFF",t.maroon="#800000",t.red="#FF0000",t.purple="#800080",t.fuchsia="#FF00FF",t.green="#008000",t.lime="#00FF00",t.olive="#808000",t.yellow="#FFFF00",t.navy="#000080",t.blue="#0000FF",t.teal="#008080",t.aqua="#00FFFF",t.orange="#FFA500",t.aliceblue="#F0F8FF",t.antiquewhite="#FAEBD7",t.aquamarine="#7FFFD4",t.azure="#F0FFFF",t.beige="#F5F5DC",t.bisque="#FFE4C4",t.blanchedalmond="#FFEBCD",t.blueviolet="#8A2BE2",t.brown="#A52A2A",t.burlywood="#DEB887",t.cadetblue="#5F9EA0",t.chartreuse="#7FFF00",t.chocolate="#D2691E",t.coral="#FF7F50",t.cornflowerblue="#6495ED",t.cornsilk="#FFF8DC",t.crimson="#DC143C",t.cyan="#00FFFF",t.darkblue="#00008B",t.darkcyan="#008B8B",t.darkgoldenrod="#B8860B",t.darkgray="#A9A9A9",t.darkgreen="#006400",t.darkgrey="#A9A9A9",t.darkkhaki="#BDB76B",t.darkmagenta="#8B008B",t.darkolivegreen="#556B2F",t.darkorange="#FF8C00",t.darkorchid="#9932CC",t.darkred="#8B0000",t.darksalmon="#E9967A",t.darkseagreen="#8FBC8F",t.darkslateblue="#483D8B",t.darkslategray="#2F4F4F",t.darkslategrey="#2F4F4F",t.darkturquoise="#00CED1",t.darkviolet="#9400D3",t.deeppink="#FF1493",t.deepskyblue="#00BFFF",t.dimgray="#696969",t.dimgrey="#696969",t.dodgerblue="#1E90FF",t.firebrick="#B22222",t.floralwhite="#FFFAF0",t.forestgreen="#228B22",t.gainsboro="#DCDCDC",t.ghostwhite="#F8F8FF",t.gold="#FFD700",t.goldenrod="#DAA520",t.greenyellow="#ADFF2F",t.grey="#808080",t.honeydew="#F0FFF0",t.hotpink="#FF69B4",t.indianred="#CD5C5C",t.indigo="#4B0082",t.ivory="#FFFFF0",t.khaki="#F0E68C",t.lavender="#E6E6FA",t.lavenderblush="#FFF0F5",t.lawngreen="#7CFC00",t.lemonchiffon="#FFFACD",t.lightblue="#ADD8E6",t.lightcoral="#F08080",t.lightcyan="#E0FFFF",t.lightgoldenrodyellow="#FAFAD2",t.lightgray="#D3D3D3",t.lightgreen="#90EE90",t.lightgrey="#D3D3D3",t.lightpink="#FFB6C1",t.lightsalmon="#FFA07A",t.lightseagreen="#20B2AA",t.lightskyblue="#87CEFA",t.lightslategray="#778899",t.lightslategrey="#778899",t.lightsteelblue="#B0C4DE",t.lightyellow="#FFFFE0",t.limegreen="#32CD32",t.linen="#FAF0E6",t.magenta="#FF00FF",t.mediumaquamarine="#66CDAA",t.mediumblue="#0000CD",t.mediumorchid="#BA55D3",t.mediumpurple="#9370DB",t.mediumseagreen="#3CB371",t.mediumslateblue="#7B68EE",t.mediumspringgreen="#00FA9A",t.mediumturquoise="#48D1CC",t.mediumvioletred="#C71585",t.midnightblue="#191970",t.mintcream="#F5FFFA",t.mistyrose="#FFE4E1",t.moccasin="#FFE4B5",t.navajowhite="#FFDEAD",t.oldlace="#FDF5E6",t.olivedrab="#6B8E23",t.orangered="#FF4500",t.orchid="#DA70D6",t.palegoldenrod="#EEE8AA",t.palegreen="#98FB98",t.paleturquoise="#AFEEEE",t.palevioletred="#DB7093",t.papayawhip="#FFEFD5",t.peachpuff="#FFDAB9",t.peru="#CD853F",t.pink="#FFC0CB",t.plum="#DDA0DD",t.powderblue="#B0E0E6",t.rosybrown="#BC8F8F",t.royalblue="#4169E1",t.saddlebrown="#8B4513",t.salmon="#FA8072",t.sandybrown="#F4A460",t.seagreen="#2E8B57",t.seashell="#FFF5EE",t.sienna="#A0522D",t.skyblue="#87CEEB",t.slateblue="#6A5ACD",t.slategray="#708090",t.slategrey="#708090",t.snow="#FFFAFA",t.springgreen="#00FF7F",t.steelblue="#4682B4",t.tan="#D2B48C",t.thistle="#D8BFD8",t.tomato="#FF6347",t.turquoise="#40E0D0",t.violet="#EE82EE",t.wheat="#F5DEB3",t.whitesmoke="#F5F5F5",t.yellowgreen="#9ACD32",t.rebeccapurple="#663399"}(a||(a={}));var c,u,s=Object.keys(a),l={HEX:["r","g","b","a"],RGB:["r","g","b","a"],HSL:["h","s","l","a"],CMYK:["c","m","y","k","a"]},d={BGR:r.RGB,ABGR:r.RGB,HLS:r.HSL,AHLS:r.HSL,CKMY:r.CMYK,ACKMY:r.CMYK};!function(t){t.NUMBER="number",t.BOOLEAN="boolean"}(c||(c={}));var f,h,p,g=((u={})[r.HEX]=/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,u[r.RGB]=/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[r.HSL]=/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u[r.CMYK]=/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,u),m=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,b=/^(\d+(?:\.\d+)?|\.\d+)%$/,y=/^0x([a-f\d]{1,2})$/i,A=/\{(\d+)\}/g,E=/,( +|\d+)/g,F=/ +/,v="The provided string color doesn't have a correct format",H="The provided color object doesn't have the proper keys or format";!function(t){t.NONE="none",t.DEGREES="deg",t.GRADIANS="grad",t.RADIANS="rad",t.TURNS="turn"}(f||(f={})),function(t){t.NONE="none",t.PERCENT="percent"}(h||(h={})),function(t){t.DEVICE_CMYK="device-cmyk",t.CMYK="cmyk"}(p||(p={}));var B,C,S,M,R,D,O={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:f.NONE,rgbUnit:h.NONE,cmykUnit:h.PERCENT,alphaUnit:h.NONE,cmykFunction:p.DEVICE_CMYK},L=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},G=function(t){return+"".concat(t).replace(b,"$1")},k=function(t){return b.test("".concat(t))?G(t):Math.min(+t,100)},j=function(t){return 1===t.length&&(t+=t),parseInt(t,16)},X=function(t){var e=K(t,0).toString(16).toUpperCase();return 1===e.length?"0x0".concat(e):"0x".concat(e)},I=function(t,e){return void 0===e&&(e=!1),!e&&b.test(t)?Math.min(255*G(t)/100,255):y.test(t)?(3===t.length&&(t+=t.slice(-1)),e?K(t)/255:K(t)):Math.min(+t,e?1:255)},Y=function(t){return Math.min(b.test(t)?G(t)/100:+t,1)},T=function(t){return n([],t,!0).sort().join("").toUpperCase()},K=function(t,e){void 0===e&&(e=6);var n=Math.pow(10,e);return Math.round(+t*n)/n},N=function(t,e,n){return Math.max(e,Math.min(t,n))},x=360,P=function(t){if("string"==typeof t){var e=t.match(m),n=+e[1];switch(e[2]){case f.RADIANS:t=K(180*n/Math.PI);break;case f.TURNS:t=K(n*x);break;case f.GRADIANS:t=K(.9*n);break;case f.DEGREES:default:t=n}}return(t>360||t<0)&&(t-=Math.floor(t/x)*x),t},U=function(t,e){var n;switch(e){case f.RADIANS:n=K(function(t){return t*Math.PI/180}(t));break;case f.TURNS:n=K(t/x);break;case f.GRADIANS:n=K(10/9*t);break;case f.DEGREES:case f.NONE:default:n=t}return n},w=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=[],i=[],o=[],a=[],u=[],s=Object.values(f),l=Object.values(h),d=Object.values(p),y={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0},A=0,v=e;A<v.length;A++){var H=v[A];if("string"==typeof H){if(r.push(H),H.includes(",")){y.legacyCSS++;var B=H.match(E);1===new Set(B).size&&F.test(B[0].slice(1))&&y.spacesAfterCommas++}if(H.match(g.HSL)){var C=(k=H.match(g.HSL))[1]||k[5],S=k[8],M=C.match(m)[2];i.push(""===M?f.NONE:M),u.push(b.test(S));continue}if(g.RGB.test(H)){var R=(k=H.match(g.RGB))[1]||k[5],D=k[2]||k[6],L=k[3]||k[7],G=k[8];o.push(b.test(R)&&b.test(D)&&b.test(L)),u.push(b.test(G));continue}if(H.match(g.CMYK)){var k,j=(k=H.match(g.CMYK))[1]||k[6],X=k[2]||k[7],I=k[3]||k[8],Y=k[4]||k[9];G=k[10];a.push(b.test(j)&&b.test(X)&&b.test(I)&&b.test(Y)),H.startsWith("cmyk")&&y.cmykFunction++,u.push(b.test(G))}}}return{decimals:typeof t.decimals===c.NUMBER?t.decimals:O.decimals,legacyCSS:typeof t.legacyCSS===c.BOOLEAN?t.legacyCSS:Boolean(r.length&&y.legacyCSS===r.length)||O.legacyCSS,spacesAfterCommas:typeof t.spacesAfterCommas===c.BOOLEAN?t.spacesAfterCommas:Boolean(r.length&&y.spacesAfterCommas===r.length)||O.spacesAfterCommas,anglesUnit:t.anglesUnit&&s.includes(t.anglesUnit)?t.anglesUnit:1===new Set(i).size?i[0]:O.anglesUnit,rgbUnit:t.rgbUnit&&l.includes(t.rgbUnit)?t.rgbUnit:1===new Set(o).size&&o[0]?h.PERCENT:O.rgbUnit,cmykUnit:t.cmykUnit&&l.includes(t.cmykUnit)?t.cmykUnit:1!==new Set(a).size||a[0]?O.cmykUnit:h.NONE,alphaUnit:t.alphaUnit&&l.includes(t.alphaUnit)?t.alphaUnit:1===new Set(u).size&&u[0]?h.PERCENT:O.alphaUnit,cmykFunction:t.cmykFunction&&d.includes(t.cmykFunction)?t.cmykFunction:a.length&&a.length===y.cmykFunction?p.CMYK:O.cmykFunction}},V=function(t,e,n){return n<0&&(n+=6),n>=6&&(n-=6),K(n<1?255*((e-t)*n+t):n<3?255*e:n<4?255*((e-t)*(4-n)+t):255*t)},q=function(t,e,n){e/=100;var r=(n/=100)<=.5?n*(e+1):n+e-n*e,i=2*n-r;return{r:V(i,r,(t/=60)+2),g:V(i,r,t),b:V(i,r,t-2)}},_=function(t,e,n,r){return{r:K(255*(1-t)*(r=1-r)),g:K(255*(1-e)*r),b:K(255*(1-n)*r)}},$=function(t,e,n){t/=255,e/=255,n/=255;var r=1-Math.max(t,e,n),i=1-r,o=i&&(i-e)/i,a=i&&(i-n)/i;return{c:K(100*(i&&(i-t)/i)),m:K(100*o),y:K(100*a),k:K(100*r)}},z=function(t,e,n,r){void 0===r&&(r=1),t/=255,e/=255,n/=255,r=Math.min(r,1);var i=Math.max(t,e,n),o=Math.min(t,e,n),a=i-o,c=0,u=0,s=(i+o)/2;if(0!==a){switch(i){case t:c=(e-n)/a%6;break;case e:c=(n-t)/a+2;break;case n:c=(t-e)/a+4}(c=K(60*c))<0&&(c+=360),u=a/(1-Math.abs(2*s-1))}return{h:c,s:K(100*u),l:K(100*s),a:r}},Q=function(t,e){if(t<0&&(t+=360),t>360&&(t-=360),360===t||0===t)return t;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=e?r:n,o=0,a=0,c=0,u=0;return(e?n:r).find((function(e,n){return t>=e[0]&&t<e[1]&&(o=e[0],a=e[1],c=i[n][0],u=i[n][1],!0)})),c+(u-c)/(a-o)*(t-o)},W=function(t){return t?", ":","},J=function(t,e){var n=T(Object.keys(t));return l[d[n]].reduce((function(n,r,i){var o=t[r];return void 0!==o&&n.push(e(o,i)),n}),[])},Z=function(t,e){return t.replace(A,(function(t,n){return"".concat(e[+n-1])}))},tt=function(t,e){var n=e.alphaUnit,r=e.legacyCSS,i=e.decimals;return n!==h.PERCENT||r?K(t,i):"".concat(K(100*t,i),"%")},et=((B={})[r.HEX]=function(t){var e=J(t,(function(t){return e=K(t),1===(n=K(e,0).toString(16).toUpperCase()).length&&(n="0".concat(n)),n;var e,n})),n=4===e.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return Z(n,e)},B[r.RGB]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.rgbUnit,a=W(i),c=J(t,(function(t,r){return o===h.PERCENT&&r<3?"".concat(function(t,e){return K(t/255*100,e)}(t,n),"%"):3===r?tt(t,e):K(t,n)})),u=r?4===c.length?"rgba({1}".concat(a,"{2}").concat(a,"{3}").concat(a,"{4})"):"rgb({1}".concat(a,"{2}").concat(a,"{3})"):4===c.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return Z(u,c)},B[r.HSL]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.anglesUnit,a=W(i),c=J(t,(function(t,r){if(0===r&&o!==f.NONE){var i=K(U(t,o),n);return"".concat(i).concat(o)}return 3===r?tt(t,e):K(t,n)})),u=r?4===c.length?"hsla({1}".concat(a,"{2}%").concat(a,"{3}%").concat(a,"{4})"):"hsl({1}".concat(a,"{2}%").concat(a,"{3}%)"):4===c.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return Z(u,c)},B[r.CMYK]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.cmykUnit,a=e.cmykFunction,c=W(i),u=J(t,(function(t,r){return o===h.PERCENT&&r<4?"".concat(K(t,n),"%"):4===r?tt(t,e):K(t/100,n)})),s=r?5===u.length?"".concat(a,"({1}").concat(c,"{2}").concat(c,"{3}").concat(c,"{4}").concat(c,"{5})"):"".concat(a,"({1}").concat(c,"{2}").concat(c,"{3}").concat(c,"{4})"):5===u.length?"".concat(a,"({1} {2} {3} {4} / {5})"):"".concat(a,"({1} {2} {3} {4})");return Z(s,u)},B),nt=function(t){return"string"==typeof t&&(t=b.test(t)?G(t)/100:+t),isNaN(+t)||t>1?1:K(t)},rt=function(r,i,o){return i.reduce((function(i,a){return n(n([],i,!0),[e(e({},r),{h:o===t.Mix.ADDITIVE?P(r.h+a):P(Q(Q(r.h,!1)+a,!0))})],!1)}),[e({},r)])},it=function(t,e){return rt(t,[30,-30],e)},ot=function(t,e){return rt(t,[180],e)},at=function(t,e){return rt(t,[150,-150],e)},ct=function(t,e){return rt(t,[120,-120],e)},ut=function(t,e){return rt(t,[60,-120,180],e)},st=function(t,e){return rt(t,[90,-90,180],e)},lt=function(t){return"string"==typeof t?function(t){var e;if(Object.keys(r).some((function(n){if(g[n].test(t))return e=n,!0})),!e&&~s.indexOf(t)&&(e=r.HEX),!e)throw new Error(v);return e}(t):function(t){var e,n=!1,i=T(Object.keys(t));if(d[i]&&(e=d[i]),e&&e===r.RGB){var o=Object.entries(t).some((function(t){return!y.test("".concat(t[1]))})),a=Object.entries(t).some((function(t){return!(b.test("".concat(t[1]))||!y.test("".concat(t[1]))&&!isNaN(+t[1])&&+t[1]<=255)}));o&&a&&(n=!0),o||(e=r.HEX)}if(!e||n)throw new Error(H);return e}(t)},dt=((C={})[r.HEX]=function(t){var e=(~s.indexOf(t)?a[t]:t).match(g.HEX),n={r:j(e[1]||e[5]),g:j(e[2]||e[6]),b:j(e[3]||e[7])},r=e[4]||e[8];return void 0!==r&&(n.a=j(r)/255),n},C[r.RGB]=function(t){var e=t.match(g.RGB),n=I(e[1]||e[5]),r=I(e[2]||e[6]),i=I(e[3]||e[7]),o=e[4]||e[8],a={r:Math.min(n,255),g:Math.min(r,255),b:Math.min(i,255)};return void 0!==o&&(a.a=nt(o)),a},C[r.HSL]=function(t){var e=t.match(g.HSL),n=P(e[1]||e[5]),r=k(e[2]||e[6]),i=k(e[3]||e[7]),o=e[4]||e[8],a=q(n,r,i);return void 0!==o&&(a.a=nt(o)),a},C[r.CMYK]=function(t){var e=t.match(g.CMYK),n=Y(e[1]||e[6]),r=Y(e[2]||e[7]),i=Y(e[3]||e[8]),o=Y(e[4]||e[9]),a=e[5]||e[10],c=_(n,r,i,o);return void 0!==a&&(c.a=nt(a)),c},C),ft=((S={})[r.HEX]=function(t){var e={r:I("".concat(t.r)),g:I("".concat(t.g)),b:I("".concat(t.b))};return L(t,"a")&&(e.a=Math.min(I("".concat(t.a),!0),1)),e},S[r.RGB]=function(t){return this.HEX(t)},S[r.HSL]=function(t){var e=k("".concat(t.s)),n=k("".concat(t.l)),r=q(P(t.h),e,n);return L(t,"a")&&(r.a=nt(t.a)),r},S[r.CMYK]=function(t){var e=Y("".concat(t.c)),n=Y("".concat(t.m)),r=Y("".concat(t.y)),i=Y("".concat(t.k)),o=_(e,n,r,i);return L(t,"a")&&(o.a=nt(t.a)),o},S),ht=function(t,e){return void 0===e&&(e=lt(t)),"string"==typeof t?dt[e](t):ft[e](t)},pt=((M={})[r.HEX]=function(t){return{r:X(t.r),g:X(t.g),b:X(t.b)}},M.HEXA=function(t){var e=pt.HEX(t);return e.a=L(t,"a")?X(255*t.a):"0xFF",e},M[r.RGB]=function(t,e){var n=yt(t,e);return L(n,"a")&&delete n.a,n},M.RGBA=function(t,e){var n=pt.RGB(t,e);return n.a=L(t,"a")?K(t.a):1,n},M[r.HSL]=function(t,e){var n=z(t.r,t.g,t.b);return delete n.a,At(n,e)},M.HSLA=function(t,e){var n=pt.HSL(t,e);return n.a=L(t,"a")?K(t.a,e):1,n},M[r.CMYK]=function(t,e){return Et($(t.r,t.g,t.b),e)},M.CMYKA=function(t,e){var n=pt.CMYK(t,e);return n.a=L(t,"a")?K(t.a,e):1,n},M),gt=function(t,n,i,o){var a=lt(t),c="string"==typeof t,u=ht(t,a),s="string"==typeof t&&L(u,"a")||"string"!=typeof t&&L(t,"a"),l=z(u.r,u.g,u.b,u.a);s||delete l.a;var d=i?l.l/(n+1):(100-l.l)/(n+1),f=Array(n).fill(null).map((function(t,n){return e(e({},l),{l:l.l+d*(n+1)*(1-2*+i)})}));switch(a){case r.HEX:default:return f.map((function(t){var n=q(t.h,t.s,t.l);return s&&(n.a=t.a),c?s?et.HEX(e(e({},n),{a:K(255*n.a)})):et.HEX(n):s?pt.HEXA(n):pt.HEX(n)}));case r.RGB:return f.map((function(t){var e=q(t.h,t.s,t.l);return s&&(e.a=t.a),c?et.RGB(e,o):s?pt.RGBA(e,o.decimals):pt.RGB(e,o.decimals)}));case r.HSL:return f.map((function(t){return c?et.HSL(t,o):s?pt.HSLA(e(e({},q(t.h,t.s,t.l)),{a:t.a}),o.decimals):pt.HSL(q(t.h,t.s,t.l),o.decimals)}))}},mt=((R={buildHarmony:function(t,e,n,i){var o=lt(t),a=ht(t,o),c=z(a.r,a.g,a.b,a.a),u="string"==typeof t&&L(a,"a")||"string"!=typeof t&&L(t,"a"),s="string"==typeof t;switch(o){case r.HEX:default:return u?this.HEXA(At(c,0),e,n,s):this.HEX(At(c,0),e,n,s);case r.HSL:return u?this.HSLA(c,e,n,s,i):this.HSL(c,e,n,s,i);case r.RGB:return u?this.RGBA(c,e,n,s,i):this.RGB(c,e,n,s,i)}}})[r.HEX]=function(t,e,n,r){return e(t,n).map((function(t){return r?et.HEX(q(t.h,t.s,t.l)):pt.HEX(q(t.h,t.s,t.l))}))},R.HEXA=function(t,n,r,i){return n(t,r).map((function(t){return i?et.HEX(e(e({},q(t.h,t.s,t.l)),{a:255*nt(t.a)})):pt.HEXA(e(e({},q(t.h,t.s,t.l)),{a:nt(t.a)}))}))},R[r.RGB]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?et.RGB(q(t.h,t.s,t.l),i):pt.RGB(q(t.h,t.s,t.l),i.decimals)}))},R.RGBA=function(t,n,r,i,o){return n(t,r).map((function(t){return i?et.RGB(e(e({},q(t.h,t.s,t.l)),{a:nt(t.a)}),o):pt.RGBA(e(e({},q(t.h,t.s,t.l)),{a:nt(t.a)}),o.decimals)}))},R[r.HSL]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?et.HSL({h:t.h,s:t.s,l:t.l},i):pt.HSL(q(t.h,t.s,t.l),i.decimals)}))},R.HSLA=function(t,n,r,i,o){return n(t,r).map((function(t){return i?et.HSL(e(e({},t),{a:nt(t.a)}),o):pt.HSLA(e(e({},q(t.h,t.s,t.l)),{a:nt(t.a)}),o.decimals)}))},R),bt=((D={mix:function(n,r){var i,o,a,c,u,s,l,d,f,h,p,g,m,b,y,A=n.map((function(t){var e=lt(t);return ht(t,e)})),E=r===t.Mix.SUBTRACTIVE?A.map((function(t){var e,n,r,i,o,a,c,u,s,l,d,f,h,p,g=(e=t.r,n=t.g,r=t.b,i=Math.min(e,n,r),o=Math.min(255-e,255-n,255-r),a=e-i,c=n-i,u=r-i,s=Math.min(a,c),l=a-s,d=(c+s)/2,f=(u+c-s)/2,h=Math.max(l,d,f)/Math.max(a,c,u),p=isNaN(h)||h===1/0||h<=0?1:h,{r:l/p+o,y:d/p+o,b:f/p+o});return L(t,"a")&&(g.a=t.a),g})):null;function F(n){var i=r===t.Mix.ADDITIVE?{r:0,g:0,b:0,a:0}:{r:0,y:0,b:0,a:0};return n.reduce((function(n,i){var o=L(i,"a")?i.a:1,a={r:Math.min(n.r+i.r*o,255),b:Math.min(n.b+i.b*o,255),a:1-(1-o)*(1-n.a)},c="g"in n?n.g:n.y,u="g"in i?i.g:i.y;return e(e({},a),r===t.Mix.ADDITIVE?{g:Math.min(c+u*o,255)}:{y:Math.min(c+u*o,255)})}),i)}if(r===t.Mix.ADDITIVE)i=F(A);else{var v=F(E);o=v.r,a=v.y,c=v.b,u=Math.min(o,a,c),s=Math.min(255-o,255-a,255-c),l=o-u,d=a-u,f=c-u,h=Math.min(d,f),p=l+d-h,g=d+h,m=2*(f-h),b=Math.max(p,g,m)/Math.max(l,d,f),y=isNaN(b)||b===1/0||b<=0?1:b,(i={r:p/y+s,g:g/y+s,b:m/y+s}).a=v.a}return{r:K(i.r),g:K(i.g),b:K(i.b),a:N(i.a,0,1)}}})[r.HEX]=function(t,e,n){var r=this.mix(t,e);return delete r.a,n?et.HEX(r):pt.HEX(r)},D.HEXA=function(t,e,n){var r=this.mix(t,e);return r.a=n?255*nt(r.a):nt(r.a),n?et.HEX(r):pt.HEXA(r)},D[r.RGB]=function(t,e,n,r){var i=this.mix(t,e);return delete i.a,n?et.RGB(i,r):pt.RGB(i,r.decimals)},D.RGBA=function(t,e,n,r){var i=this.mix(t,e);return n?et.RGB(i,r):pt.RGBA(i,r.decimals)},D[r.HSL]=function(t,e,n,r){var i=this.mix(t,e),o=z(i.r,i.g,i.b);return delete i.a,delete o.a,n?et.HSL(o,r):pt.HSL(i,r.decimals)},D.HSLA=function(t,e,n,r){var i=this.mix(t,e),o=z(i.r,i.g,i.b,i.a);return n?et.HSL(o,r):pt.HSLA(i,r.decimals)},D),yt=function(t,n){var r=K(t.r,n),i=K(t.g,n),o=K(t.b,n);return e({r:r,g:i,b:o},L(t,"a")?{a:K(t.a,n)}:{})},At=function(t,n){return e({h:K(t.h,n),s:K(t.s,n),l:K(t.l,n)},L(t,"a")?{a:K(t.a,n)}:{})},Et=function(t,e){return{c:K(t.c,e),m:K(t.m,e),y:K(t.y,e),k:K(t.k,e)}},Ft=function(t,e,n,r){return r(ht(t,e),n)},vt=function(t,e,n,r,i){n<1&&(n=5);var o=function(t,e,n){var r=n-1,i=(e.r-t.r)/r,o=(e.g-t.g)/r,a=(e.b-t.b)/r,c=nt(t.a),u=(nt(e.a)-c)/r;return Array(n).fill(null).map((function(n,s){return 0===s?t:s===r?e:{r:K(t.r+i*s),g:K(t.g+o*s),b:K(t.b+a*s),a:K(c+u*s)}}))}(ht(t),ht(e),n);return o.map((function(t){return i(t,r)}))},Ht=function(){function r(t,e){void 0===e&&(e={}),this._options=w(e,t),this.rgb=ht(t),this.updateHSL(),this.updateCMYK()}return r.prototype.updateRGB=function(){this.rgb=e(e({},q(this.hsl.h,this.hsl.s,this.hsl.l)),{a:this.hsl.a})},r.prototype.updateRGBFromCMYK=function(){this.rgb=e(e({},_(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k)),{a:this.rgb.a})},r.prototype.updateHSL=function(){this.hsl=z(this.rgb.r,this.rgb.g,this.rgb.b,this.rgb.a)},r.prototype.updateCMYK=function(){this.cmyk=$(this.rgb.r,this.rgb.g,this.rgb.b)},r.prototype.updateRGBAndCMYK=function(){return this.updateRGB(),this.updateCMYK(),this},r.prototype.updateHSLAndCMYK=function(){return this.updateHSL(),this.updateCMYK(),this},r.prototype.updateRGBAndHSL=function(){return this.updateRGBFromCMYK(),this.updateHSL(),this},r.prototype.setOptions=function(t){return void 0===t&&(t={}),this._options=e(e({},this._options),t),this},r.prototype.setH=function(t){return this.hsl.h=P(t),this.updateRGBAndCMYK()},r.prototype.setS=function(t){return this.hsl.s=N(t,0,100),this.updateRGBAndCMYK()},r.prototype.setL=function(t){return this.hsl.l=N(t,0,100),this.updateRGBAndCMYK()},r.prototype.setR=function(t){return this.rgb.r=N(t,0,255),this.updateHSLAndCMYK()},r.prototype.setG=function(t){return this.rgb.g=N(t,0,255),this.updateHSLAndCMYK()},r.prototype.setB=function(t){return this.rgb.b=N(t,0,255),this.updateHSLAndCMYK()},r.prototype.setA=function(t){return this.hsl.a=this.rgb.a=N(t,0,1),this},r.prototype.setC=function(t){return this.cmyk.c=N(t,0,100),this.updateRGBAndHSL()},r.prototype.setM=function(t){return this.cmyk.m=N(t,0,100),this.updateRGBAndHSL()},r.prototype.setY=function(t){return this.cmyk.y=N(t,0,100),this.updateRGBAndHSL()},r.prototype.setK=function(t){return this.cmyk.k=N(t,0,100),this.updateRGBAndHSL()},Object.defineProperty(r.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"H",{get:function(){return K(this.hsl.h,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"S",{get:function(){return K(this.hsl.s,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"L",{get:function(){return K(this.hsl.l,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"R",{get:function(){return K(this.rgb.r,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"G",{get:function(){return K(this.rgb.g,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"B",{get:function(){return K(this.rgb.b,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"A",{get:function(){return K(this.hsl.a,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"C",{get:function(){return K(this.cmyk.c,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"M",{get:function(){return K(this.cmyk.m,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Y",{get:function(){return K(this.cmyk.y,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"K",{get:function(){return K(this.cmyk.k,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEXObject",{get:function(){return pt.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEXAObject",{get:function(){return pt.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGBObject",{get:function(){return{r:this.R,g:this.G,b:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGBAObject",{get:function(){return e(e({},this.RGBObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSLObject",{get:function(){return{h:this.H,s:this.S,l:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSLAObject",{get:function(){return e(e({},this.HSLObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYKObject",{get:function(){return{c:this.C,m:this.M,y:this.Y,k:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYKAObject",{get:function(){return e(e({},this.CMYKObject),{a:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEX",{get:function(){return et.HEX({r:this.R,g:this.G,b:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEXA",{get:function(){return et.HEX({r:this.R,g:this.G,b:this.B,a:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGB",{get:function(){return et.RGB({r:this.R,g:this.G,b:this.B},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGBA",{get:function(){return et.RGB({r:this.R,g:this.G,b:this.B,a:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSL",{get:function(){return et.HSL({h:this.H,s:this.S,l:this.L},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSLA",{get:function(){return et.HSL({h:this.H,s:this.S,l:this.L,a:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYK",{get:function(){return et.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYKA",{get:function(){return et.CMYK({c:this.C,m:this.M,y:this.Y,k:this.K,a:this.A},this.options)},enumerable:!1,configurable:!0}),r.toHEXObject=function(t){var e=lt(t);return Ft(t,e,0,pt.HEX)},r.toHEX=function(t){return et.HEX(r.toHEXObject(t))},r.toHEXAObject=function(t){var e=lt(t);return Ft(t,e,0,pt.HEXA)},r.toHEXA=function(t){return et.HEX(r.toHEXAObject(t))},r.toRGBObject=function(t,e){void 0===e&&(e={});var n=lt(t);return Ft(t,n,e.decimals,pt.RGB)},r.toRGB=function(t,e){void 0===e&&(e={});var n=lt(t),r=w(e,t),i=Ft(t,n,6,pt.RGB);return et.RGB(i,r)},r.toRGBAObject=function(t,e){void 0===e&&(e={});var n=lt(t);return Ft(t,n,e.decimals,pt.RGBA)},r.toRGBA=function(t,e){void 0===e&&(e={});var n=lt(t),r=w(e,t),i=Ft(t,n,6,pt.RGBA);return et.RGB(i,r)},r.toHSLObject=function(t,e){void 0===e&&(e={});var n=lt(t);return Ft(t,n,e.decimals,pt.HSL)},r.toHSL=function(t,e){void 0===e&&(e={});var n=lt(t),r=w(e,t),i=Ft(t,n,6,pt.HSL);return et.HSL(i,r)},r.toHSLAObject=function(t,e){void 0===e&&(e={});var n=lt(t);return Ft(t,n,e.decimals,pt.HSLA)},r.toHSLA=function(t,e){void 0===e&&(e={});var n=lt(t),r=w(e,t),i=Ft(t,n,6,pt.HSLA);return et.HSL(i,r)},r.toCMYKObject=function(t,e){void 0===e&&(e={});var n=lt(t);return Ft(t,n,e.decimals,pt.CMYK)},r.toCMYK=function(t,e){void 0===e&&(e={});var n=lt(t),r=w(e,t),i=Ft(t,n,6,pt.CMYK);return et.CMYK(i,r)},r.toCMYKAObject=function(t,e){void 0===e&&(e={});var n=lt(t);return Ft(t,n,e.decimals,pt.CMYKA)},r.toCMYKA=function(t,e){void 0===e&&(e={});var n=lt(t),r=w(e,t),i=Ft(t,n,6,pt.CMYKA);return et.CMYK(i,r)},r.getBlendHEXObject=function(t,e,n){return void 0===n&&(n=5),vt(t,e,n,0,pt.HEX)},r.getBlendHEX=function(t,e,n){return void 0===n&&(n=5),r.getBlendHEXObject(t,e,n).map((function(t){return et.HEX(t)}))},r.getBlendHEXAObject=function(t,e,n){return void 0===n&&(n=5),vt(t,e,n,0,pt.HEXA)},r.getBlendHEXA=function(t,e,n){return void 0===n&&(n=5),r.getBlendHEXAObject(t,e,n).map((function(t){return et.HEX(t)}))},r.getBlendRGBObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),vt(t,e,n,r.decimals,pt.RGB)},r.getBlendRGB=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),vt(t,e,n,6,pt.RGB).map((function(n){return et.RGB(n,w(r,t,e))}))},r.getBlendRGBAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),vt(t,e,n,r.decimals,pt.RGBA)},r.getBlendRGBA=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),vt(t,e,n,6,pt.RGBA).map((function(n){return et.RGB(n,w(r,t,e))}))},r.getBlendHSLObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),vt(t,e,n,r.decimals,pt.HSL)},r.getBlendHSL=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=w(r,t,e);return vt(t,e,n,6,pt.HSL).map((function(t){return et.HSL(t,i)}))},r.getBlendHSLAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),vt(t,e,n,r.decimals,pt.HSLA)},r.getBlendHSLA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=w(r,t,e);return vt(t,e,n,6,pt.HSLA).map((function(t){return et.HSL(t,i)}))},r.getMixHEXObject=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),bt.HEX(e,n,!1)},r.getMixHEX=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),bt.HEX(e,n,!0)},r.getMixHEXAObject=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),bt.HEXA(e,n,!1)},r.getMixHEXA=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),bt.HEXA(e,n,!0)},r.getMixRGBObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.RGB(e,r,!1,w.apply(void 0,n([i],e,!1)))},r.getMixRGB=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.RGB(e,r,!0,w.apply(void 0,n([i],e,!1)))},r.getMixRGBAObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.RGBA(e,r,!1,w.apply(void 0,n([i],e,!1)))},r.getMixRGBA=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.RGBA(e,r,!0,w.apply(void 0,n([i],e,!1)))},r.getMixHSLObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.HSL(e,r,!1,w.apply(void 0,n([i],e,!1)))},r.getMixHSL=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.HSL(e,r,!0,w.apply(void 0,n([i],e,!1)))},r.getMixHSLAObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.HSLA(e,r,!1,w.apply(void 0,n([i],e,!1)))},r.getMixHSLA=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),bt.HSLA(e,r,!0,w.apply(void 0,n([i],e,!1)))},r.getShades=function(t,e,n){return void 0===n&&(n={}),gt(t,e,!0,w(n,t))},r.getTints=function(t,e,n){return void 0===n&&(n={}),gt(t,e,!1,w(n,t))},r.getHarmony=function(e,n,r,i){return void 0===n&&(n=t.Harmony.COMPLEMENTARY),void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),function(e,n,r,i){var o;return(o={},o[t.Harmony.ANALOGOUS]=mt.buildHarmony(n,it,r,i),o[t.Harmony.COMPLEMENTARY]=mt.buildHarmony(n,ot,r,i),o[t.Harmony.SPLIT_COMPLEMENTARY]=mt.buildHarmony(n,at,r,i),o[t.Harmony.TRIADIC]=mt.buildHarmony(n,ct,r,i),o[t.Harmony.TETRADIC]=mt.buildHarmony(n,ut,r,i),o[t.Harmony.SQUARE]=mt.buildHarmony(n,st,r,i),o)[e]}(n,e,r,w(i,e))},r}();return t.ColorTranslator=Ht,t}({});
var colortranslator=function(t){"use strict";var e=function(){return e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},e.apply(this,arguments)};function n(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var r,i,o,a;!function(t){t.HEX="HEX",t.RGB="RGB",t.HSL="HSL",t.CIELab="CIELab",t.CMYK="CMYK"}(r||(r={})),t.Harmony=void 0,(i=t.Harmony||(t.Harmony={})).ANALOGOUS="ANALOGOUS",i.COMPLEMENTARY="COMPLEMENTARY",i.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",i.TRIADIC="TRIADIC",i.TETRADIC="TETRADIC",i.SQUARE="SQUARE",t.Mix=void 0,(o=t.Mix||(t.Mix={})).ADDITIVE="ADDITIVE",o.SUBTRACTIVE="SUBTRACTIVE",function(t){t.black="#000000",t.silver="#C0C0C0",t.gray="#808080",t.white="#FFFFFF",t.maroon="#800000",t.red="#FF0000",t.purple="#800080",t.fuchsia="#FF00FF",t.green="#008000",t.lime="#00FF00",t.olive="#808000",t.yellow="#FFFF00",t.navy="#000080",t.blue="#0000FF",t.teal="#008080",t.aqua="#00FFFF",t.orange="#FFA500",t.aliceblue="#F0F8FF",t.antiquewhite="#FAEBD7",t.aquamarine="#7FFFD4",t.azure="#F0FFFF",t.beige="#F5F5DC",t.bisque="#FFE4C4",t.blanchedalmond="#FFEBCD",t.blueviolet="#8A2BE2",t.brown="#A52A2A",t.burlywood="#DEB887",t.cadetblue="#5F9EA0",t.chartreuse="#7FFF00",t.chocolate="#D2691E",t.coral="#FF7F50",t.cornflowerblue="#6495ED",t.cornsilk="#FFF8DC",t.crimson="#DC143C",t.cyan="#00FFFF",t.darkblue="#00008B",t.darkcyan="#008B8B",t.darkgoldenrod="#B8860B",t.darkgray="#A9A9A9",t.darkgreen="#006400",t.darkgrey="#A9A9A9",t.darkkhaki="#BDB76B",t.darkmagenta="#8B008B",t.darkolivegreen="#556B2F",t.darkorange="#FF8C00",t.darkorchid="#9932CC",t.darkred="#8B0000",t.darksalmon="#E9967A",t.darkseagreen="#8FBC8F",t.darkslateblue="#483D8B",t.darkslategray="#2F4F4F",t.darkslategrey="#2F4F4F",t.darkturquoise="#00CED1",t.darkviolet="#9400D3",t.deeppink="#FF1493",t.deepskyblue="#00BFFF",t.dimgray="#696969",t.dimgrey="#696969",t.dodgerblue="#1E90FF",t.firebrick="#B22222",t.floralwhite="#FFFAF0",t.forestgreen="#228B22",t.gainsboro="#DCDCDC",t.ghostwhite="#F8F8FF",t.gold="#FFD700",t.goldenrod="#DAA520",t.greenyellow="#ADFF2F",t.grey="#808080",t.honeydew="#F0FFF0",t.hotpink="#FF69B4",t.indianred="#CD5C5C",t.indigo="#4B0082",t.ivory="#FFFFF0",t.khaki="#F0E68C",t.lavender="#E6E6FA",t.lavenderblush="#FFF0F5",t.lawngreen="#7CFC00",t.lemonchiffon="#FFFACD",t.lightblue="#ADD8E6",t.lightcoral="#F08080",t.lightcyan="#E0FFFF",t.lightgoldenrodyellow="#FAFAD2",t.lightgray="#D3D3D3",t.lightgreen="#90EE90",t.lightgrey="#D3D3D3",t.lightpink="#FFB6C1",t.lightsalmon="#FFA07A",t.lightseagreen="#20B2AA",t.lightskyblue="#87CEFA",t.lightslategray="#778899",t.lightslategrey="#778899",t.lightsteelblue="#B0C4DE",t.lightyellow="#FFFFE0",t.limegreen="#32CD32",t.linen="#FAF0E6",t.magenta="#FF00FF",t.mediumaquamarine="#66CDAA",t.mediumblue="#0000CD",t.mediumorchid="#BA55D3",t.mediumpurple="#9370DB",t.mediumseagreen="#3CB371",t.mediumslateblue="#7B68EE",t.mediumspringgreen="#00FA9A",t.mediumturquoise="#48D1CC",t.mediumvioletred="#C71585",t.midnightblue="#191970",t.mintcream="#F5FFFA",t.mistyrose="#FFE4E1",t.moccasin="#FFE4B5",t.navajowhite="#FFDEAD",t.oldlace="#FDF5E6",t.olivedrab="#6B8E23",t.orangered="#FF4500",t.orchid="#DA70D6",t.palegoldenrod="#EEE8AA",t.palegreen="#98FB98",t.paleturquoise="#AFEEEE",t.palevioletred="#DB7093",t.papayawhip="#FFEFD5",t.peachpuff="#FFDAB9",t.peru="#CD853F",t.pink="#FFC0CB",t.plum="#DDA0DD",t.powderblue="#B0E0E6",t.rosybrown="#BC8F8F",t.royalblue="#4169E1",t.saddlebrown="#8B4513",t.salmon="#FA8072",t.sandybrown="#F4A460",t.seagreen="#2E8B57",t.seashell="#FFF5EE",t.sienna="#A0522D",t.skyblue="#87CEEB",t.slateblue="#6A5ACD",t.slategray="#708090",t.slategrey="#708090",t.snow="#FFFAFA",t.springgreen="#00FF7F",t.steelblue="#4682B4",t.tan="#D2B48C",t.thistle="#D8BFD8",t.tomato="#FF6347",t.turquoise="#40E0D0",t.violet="#EE82EE",t.wheat="#F5DEB3",t.whitesmoke="#F5F5F5",t.yellowgreen="#9ACD32",t.rebeccapurple="#663399"}(a||(a={}));var u,c,s=Object.keys(a),d={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},l={BGR:r.RGB,ABGR:r.RGB,HLS:r.HSL,AHLS:r.HSL,LAB:r.CIELab,ALAB:r.CIELab,CKMY:r.CMYK,ACKMY:r.CMYK};!function(t){t.NUMBER="number",t.BOOLEAN="boolean"}(u||(u={}));var f,h,b,p=((c={})[r.HEX]=/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,c[r.RGB]=/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[r.HSL]=/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[r.CIELab]=/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c[r.CMYK]=/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,c),A=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,E=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,m=/^0x([a-f\d]{1,2})$/i,g=/\{(\d+)\}/g,C=/,( +|\d+)/g,L=/ +/,v="The provided string color doesn't have a correct format",y="The provided color object doesn't have the proper keys or format";!function(t){t.NONE="none",t.DEGREES="deg",t.GRADIANS="grad",t.RADIANS="rad",t.TURNS="turn"}(f||(f={})),function(t){t.NONE="none",t.PERCENT="percent"}(h||(h={})),function(t){t.DEVICE_CMYK="device-cmyk",t.CMYK="cmyk"}(b||(b={}));var B,H,F,R,S,M,I={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:f.NONE,rgbUnit:h.NONE,labUnit:h.NONE,cmykUnit:h.PERCENT,alphaUnit:h.NONE,cmykFunction:b.DEVICE_CMYK},G=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},O=function(t){return+"".concat(t).replace(E,"$1")},D=function(t){return E.test("".concat(t))?O(t):Math.min(+t,100)},j=function(t){return 1===t.length&&(t+=t),parseInt(t,16)},Y=function(t){var e=x(t,0).toString(16).toUpperCase();return 1===e.length?"0x0".concat(e):"0x".concat(e)},k=function(t,e){return void 0===e&&(e=!1),!e&&E.test(t)?Math.min(255*O(t)/100,255):m.test(t)?(3===t.length&&(t+=t.slice(-1)),e?x(t)/255:x(t)):Math.min(+t,e?1:255)},K=function(t){return E.test(t)?N(125*O(t)/100,-125,125):N(+t,-125,125)},X=function(t){return Math.min(E.test(t)?O(t)/100:+t,1)},T=function(t){return n([],t,!0).sort().join("").toUpperCase()},x=function(t,e){void 0===e&&(e=6);var n=Math.pow(10,e);return Math.round(+t*n)/n},N=function(t,e,n){return Math.max(e,Math.min(t,n))},P=360,U=function(t){if("string"==typeof t){var e=t.match(A),n=+e[1];switch(e[2]){case f.RADIANS:t=x(180*n/Math.PI);break;case f.TURNS:t=x(n*P);break;case f.GRADIANS:t=x(.9*n);break;case f.DEGREES:default:t=n}}return(t>360||t<0)&&(t-=Math.floor(t/P)*P),t},w=function(t,e){var n;switch(e){case f.RADIANS:n=x(function(t){return t*Math.PI/180}(t));break;case f.TURNS:n=x(t/P);break;case f.GRADIANS:n=x(10/9*t);break;case f.DEGREES:case f.NONE:default:n=t}return n},V=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=[],i=[],o=[],a=[],c=[],s=[],d=Object.values(f),l=Object.values(h),m=Object.values(b),g={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0},v=0,y=e;v<y.length;v++){var B=y[v];if("string"==typeof B){if(r.push(B),B.includes(",")){g.legacyCSS++;var H=B.match(C);1===new Set(H).size&&L.test(H[0].slice(1))&&g.spacesAfterCommas++}if(B.match(p.HSL)){var F=(K=B.match(p.HSL))[1]||K[5],R=K[8],S=F.match(A)[2];i.push(""===S?f.NONE:S),s.push(E.test(R));continue}if(p.RGB.test(B)){var M=(K=B.match(p.RGB))[1]||K[5],G=K[2]||K[6],O=K[3]||K[7],D=K[8];o.push(E.test(M)&&E.test(G)&&E.test(O)),s.push(E.test(D));continue}if(p.CIELab.test(B)){var j=(K=B.match(p.CIELab))[1],Y=K[2],k=K[3];D=K[4];a.push(E.test(j)&&E.test(Y)&&E.test(k)),s.push(E.test(D));continue}if(B.match(p.CMYK)){var K,X=(K=B.match(p.CMYK))[1]||K[6],T=K[2]||K[7],x=K[3]||K[8],N=K[4]||K[9];D=K[10];c.push(E.test(X)&&E.test(T)&&E.test(x)&&E.test(N)),B.startsWith("cmyk")&&g.cmykFunction++,s.push(E.test(D))}}}return{decimals:typeof t.decimals===u.NUMBER?t.decimals:I.decimals,legacyCSS:typeof t.legacyCSS===u.BOOLEAN?t.legacyCSS:Boolean(r.length&&g.legacyCSS===r.length)||I.legacyCSS,spacesAfterCommas:typeof t.spacesAfterCommas===u.BOOLEAN?t.spacesAfterCommas:Boolean(r.length&&g.spacesAfterCommas===r.length)||I.spacesAfterCommas,anglesUnit:t.anglesUnit&&d.includes(t.anglesUnit)?t.anglesUnit:1===new Set(i).size?i[0]:I.anglesUnit,rgbUnit:t.rgbUnit&&l.includes(t.rgbUnit)?t.rgbUnit:1===new Set(o).size&&o[0]?h.PERCENT:I.rgbUnit,labUnit:t.labUnit&&l.includes(t.labUnit)?t.labUnit:1===new Set(a).size&&a[0]?h.PERCENT:I.labUnit,cmykUnit:t.cmykUnit&&l.includes(t.cmykUnit)?t.cmykUnit:1!==new Set(c).size||c[0]?I.cmykUnit:h.NONE,alphaUnit:t.alphaUnit&&l.includes(t.alphaUnit)?t.alphaUnit:1===new Set(s).size&&s[0]?h.PERCENT:I.alphaUnit,cmykFunction:t.cmykFunction&&m.includes(t.cmykFunction)?t.cmykFunction:c.length&&c.length===g.cmykFunction?b.CMYK:I.cmykFunction}},q=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],$=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],_=q.map((function(t){return t.reduce((function(t,e){return t+e}),0)})),z=function(t,e,n){return n<0&&(n+=6),n>=6&&(n-=6),x(n<1?255*((e-t)*n+t):n<3?255*e:n<4?255*((e-t)*(4-n)+t):255*t)},Q=function(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},W=function(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055},J=function(t,e,n,r){var i=[0,0,0],o=[t,e,n];return r.forEach((function(t,e){t.forEach((function(t,n){i[e]+=t*o[n]}))})),i},Z=function(t,e,n){e/=100;var r=(n/=100)<=.5?n*(e+1):n+e-n*e,i=2*n-r;return{R:z(i,r,(t/=60)+2),G:z(i,r,t),B:z(i,r,t-2)}},tt=function(t,e,n,r){void 0===r&&(r=1),t/=255,e/=255,n/=255,r=Math.min(r,1);var i=Math.max(t,e,n),o=Math.min(t,e,n),a=i-o,u=0,c=0,s=(i+o)/2;if(0!==a){switch(i){case t:u=(e-n)/a%6;break;case e:u=(n-t)/a+2;break;case n:u=(t-e)/a+4}(u=x(60*u))<0&&(u+=360),c=a/(1-Math.abs(2*s-1))}return{H:u,S:x(100*c),L:x(100*s),A:r}},et=function(t,e,n){var r,i,o,a,u,c,s=[t/255,e/255,n/255].map(Q),d=J(s[0],s[1],s[2],q),l=(r=d[0],i=d[1],o=d[2],u=(a=function(t){return t>Math.pow(6/29,3)?Math.cbrt(t):t/(3*Math.pow(6/29,2))+4/29})(r/_[0]),[116*(c=a(i/_[1]))-16,500*(u-c),200*(c-a(o/_[2]))]);return{L:l[0],a:l[1],b:l[2]}},nt=function(t,e,n){var r=function(t,e,n){var r=function(t){return t>6/29?Math.pow(t,3):3*Math.pow(6/29,2)*(t-4/29)},i=(t+16)/116,o=e/500,a=n/200;return[_[0]*r(i+o),_[1]*r(i),_[2]*r(i-a)]}(t,e,n),i=J(r[0],r[1],r[2],$).map(W);return{R:N(255*i[0],0,255),G:N(255*i[1],0,255),B:N(255*i[2],0,255)}},rt=function(t,e,n,r){return{R:x(255*(1-t)*(r=1-r)),G:x(255*(1-e)*r),B:x(255*(1-n)*r)}},it=function(t,e,n){t/=255,e/=255,n/=255;var r=1-Math.max(t,e,n),i=1-r,o=i&&(i-e)/i,a=i&&(i-n)/i;return{C:x(100*(i&&(i-t)/i)),M:x(100*o),Y:x(100*a),K:x(100*r)}},ot=function(t,e){if(t<0&&(t+=360),t>360&&(t-=360),360===t||0===t)return t;var n=[[0,120],[120,180],[180,240],[240,360]],r=[[0,60],[60,120],[120,240],[240,360]],i=e?r:n,o=0,a=0,u=0,c=0;return(e?n:r).find((function(e,n){return t>=e[0]&&t<e[1]&&(o=e[0],a=e[1],u=i[n][0],c=i[n][1],!0)})),u+(c-u)/(a-o)*(t-o)},at=function(t){return t?", ":","},ut=function(t,e){var n=T(Object.keys(t));return d[l[n]].reduce((function(n,r,i){var o=t[r];return void 0!==o&&n.push(e(o,i)),n}),[])},ct=function(t,e){return t.replace(g,(function(t,n){return"".concat(e[+n-1])}))},st=function(t,e,n){void 0===n&&(n=!1);var r=e.alphaUnit,i=e.legacyCSS,o=e.decimals;return r!==h.PERCENT||i&&!n?x(t,o):"".concat(x(100*t,o),"%")},dt=((B={})[r.HEX]=function(t){var e=ut(t,(function(t){return e=x(t),1===(n=x(e,0).toString(16).toUpperCase()).length&&(n="0".concat(n)),n;var e,n})),n=4===e.length?"#{1}{2}{3}{4}":"#{1}{2}{3}";return ct(n,e)},B[r.RGB]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.rgbUnit,a=at(i),u=ut(t,(function(t,r){return o===h.PERCENT&&r<3?"".concat(function(t,e){return x(t/255*100,e)}(t,n),"%"):3===r?st(t,e):x(t,n)})),c=r?4===u.length?"rgba({1}".concat(a,"{2}").concat(a,"{3}").concat(a,"{4})"):"rgb({1}".concat(a,"{2}").concat(a,"{3})"):4===u.length?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return ct(c,u)},B[r.HSL]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.anglesUnit,a=at(i),u=ut(t,(function(t,r){if(0===r&&o!==f.NONE){var i=x(w(t,o),n);return"".concat(i).concat(o)}return 3===r?st(t,e):x(t,n)})),c=r?4===u.length?"hsla({1}".concat(a,"{2}%").concat(a,"{3}%").concat(a,"{4})"):"hsl({1}".concat(a,"{2}%").concat(a,"{3}%)"):4===u.length?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return ct(c,u)},B[r.CIELab]=function(t,e){var n=e.decimals,r=e.labUnit,i=ut(t,(function(t,i){if(0===i){var o=x(D(t),n);return r===h.PERCENT?"".concat(o,"%"):"".concat(o)}return i<3?r===h.PERCENT?"".concat(function(t,e){return x(t/125*100,e)}(t,n),"%"):x(t,n):st(t,e,!0)})),o=4===i.length?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return ct(o,i)},B[r.CMYK]=function(t,e){var n=e.decimals,r=e.legacyCSS,i=e.spacesAfterCommas,o=e.cmykUnit,a=e.cmykFunction,u=at(i),c=ut(t,(function(t,r){return o===h.PERCENT&&r<4?"".concat(x(t,n),"%"):4===r?st(t,e):x(t/100,n)})),s=r?5===c.length?"".concat(a,"({1}").concat(u,"{2}").concat(u,"{3}").concat(u,"{4}").concat(u,"{5})"):"".concat(a,"({1}").concat(u,"{2}").concat(u,"{3}").concat(u,"{4})"):5===c.length?"".concat(a,"({1} {2} {3} {4} / {5})"):"".concat(a,"({1} {2} {3} {4})");return ct(s,c)},B),lt=function(t){return"string"==typeof t&&(t=E.test(t)?O(t)/100:+t),isNaN(+t)||t>1?1:x(t)},ft=function(r,i,o){return i.reduce((function(i,a){return n(n([],i,!0),[e(e({},r),{H:o===t.Mix.ADDITIVE?U(r.H+a):U(ot(ot(r.H,!1)+a,!0))})],!1)}),[e({},r)])},ht=function(t,e){return ft(t,[30,-30],e)},bt=function(t,e){return ft(t,[180],e)},pt=function(t,e){return ft(t,[150,-150],e)},At=function(t,e){return ft(t,[120,-120],e)},Et=function(t,e){return ft(t,[60,-120,180],e)},mt=function(t,e){return ft(t,[90,-90,180],e)},gt=function(t){return"string"==typeof t?function(t){var e;if(Object.keys(r).some((function(n){if(p[n].test(t))return e=n,!0})),!e&&~s.indexOf(t)&&(e=r.HEX),!e)throw new Error(v);return e}(t):function(t){var e,n=!1,i=T(Object.keys(t));if(l[i]&&(e=l[i]),e&&e===r.RGB){var o=Object.entries(t).some((function(t){return!m.test("".concat(t[1]))})),a=Object.entries(t).some((function(t){return!(E.test("".concat(t[1]))||!m.test("".concat(t[1]))&&!isNaN(+t[1])&&+t[1]<=255)}));o&&a&&(n=!0),o||(e=r.HEX)}if(!e||n)throw new Error(y);return e}(t)},Ct=((H={})[r.HEX]=function(t){var e=(~s.indexOf(t)?a[t]:t).match(p.HEX),n={R:j(e[1]||e[5]),G:j(e[2]||e[6]),B:j(e[3]||e[7])},r=e[4]||e[8];return void 0!==r&&(n.A=j(r)/255),n},H[r.RGB]=function(t){var e=t.match(p.RGB),n=k(e[1]||e[5]),r=k(e[2]||e[6]),i=k(e[3]||e[7]),o=e[4]||e[8],a={R:Math.min(n,255),G:Math.min(r,255),B:Math.min(i,255)};return void 0!==o&&(a.A=lt(o)),a},H[r.HSL]=function(t){var e=t.match(p.HSL),n=U(e[1]||e[5]),r=D(e[2]||e[6]),i=D(e[3]||e[7]),o=e[4]||e[8],a=Z(n,r,i);return void 0!==o&&(a.A=lt(o)),a},H[r.CIELab]=function(t){var e=t.match(p.CIELab),n=D(e[1]),r=K(e[2]),i=K(e[3]),o=e[4],a=nt(n,r,i);return void 0!==o&&(a.A=lt(o)),a},H[r.CMYK]=function(t){var e=t.match(p.CMYK),n=X(e[1]||e[6]),r=X(e[2]||e[7]),i=X(e[3]||e[8]),o=X(e[4]||e[9]),a=e[5]||e[10],u=rt(n,r,i,o);return void 0!==a&&(u.A=lt(a)),u},H),Lt=((F={})[r.HEX]=function(t){var e={R:k("".concat(t.R)),G:k("".concat(t.G)),B:k("".concat(t.B))};return G(t,"A")&&(e.A=Math.min(k("".concat(t.A),!0),1)),e},F[r.RGB]=function(t){return this.HEX(t)},F[r.HSL]=function(t){var e=D("".concat(t.S)),n=D("".concat(t.L)),r=Z(U(t.H),e,n);return G(t,"A")&&(r.A=lt(t.A)),r},F[r.CIELab]=function(t){var e=D("".concat(t.L)),n=K("".concat(t.a)),r=K("".concat(t.b)),i=nt(e,n,r);return G(t,"A")&&(i.A=lt(t.A)),i},F[r.CMYK]=function(t){var e=X("".concat(t.C)),n=X("".concat(t.M)),r=X("".concat(t.Y)),i=X("".concat(t.K)),o=rt(e,n,r,i);return G(t,"A")&&(o.A=lt(t.A)),o},F),vt=function(t,e){return void 0===e&&(e=gt(t)),"string"==typeof t?Ct[e](t):Lt[e](t)},yt=((R={})[r.HEX]=function(t){return{R:Y(t.R),G:Y(t.G),B:Y(t.B)}},R.HEXA=function(t){var e=yt.HEX(t);return e.A=G(t,"A")?Y(255*t.A):"0xFF",e},R[r.RGB]=function(t,e){var n=Rt(t,e);return G(n,"A")&&delete n.A,n},R.RGBA=function(t,e){var n=yt.RGB(t,e);return n.A=G(t,"A")?x(t.A):1,n},R[r.HSL]=function(t,e){var n=tt(t.R,t.G,t.B);return delete n.A,St(n,e)},R.HSLA=function(t,e){var n=yt.HSL(t,e);return n.A=G(t,"A")?x(t.A,e):1,n},R[r.CIELab]=function(t,e){var n=et(t.R,t.G,t.B);return Mt(n,e)},R.CIELabA=function(t,e){var n=yt.CIELab(t,e);return n.A=G(t,"A")?x(t.A,e):1,n},R[r.CMYK]=function(t,e){return It(it(t.R,t.G,t.B),e)},R.CMYKA=function(t,e){var n=yt.CMYK(t,e);return n.A=G(t,"A")?x(t.A,e):1,n},R),Bt=function(t,n,i,o){var a=gt(t),u="string"==typeof t,c=vt(t,a),s="string"==typeof t&&G(c,"A")||"string"!=typeof t&&G(t,"A"),d=tt(c.R,c.G,c.B,c.A);s||delete d.A;var l=i?d.L/(n+1):(100-d.L)/(n+1),f=Array(n).fill(null).map((function(t,n){return e(e({},d),{L:d.L+l*(n+1)*(1-2*+i)})}));switch(a){case r.HEX:default:return f.map((function(t){var n=Z(t.H,t.S,t.L);return s&&(n.A=t.A),u?s?dt.HEX(e(e({},n),{A:x(255*n.A)})):dt.HEX(n):s?yt.HEXA(n):yt.HEX(n)}));case r.RGB:return f.map((function(t){var e=Z(t.H,t.S,t.L);return s&&(e.A=t.A),u?dt.RGB(e,o):s?yt.RGBA(e,o.decimals):yt.RGB(e,o.decimals)}));case r.HSL:return f.map((function(t){return u?dt.HSL(t,o):s?yt.HSLA(e(e({},Z(t.H,t.S,t.L)),{A:t.A}),o.decimals):yt.HSL(Z(t.H,t.S,t.L),o.decimals)}));case r.CIELab:return f.map((function(t){var n=Z(t.H,t.S,t.L);return u?dt.CIELab(s?yt.CIELabA(n,o.decimals):yt.CIELab(n,o.decimals),o):s?yt.CIELabA(e(e({},n),{A:t.A}),o.decimals):yt.CIELab(n,o.decimals)}))}},Ht=((S={buildHarmony:function(t,e,n,i){var o=gt(t),a=vt(t,o),u=tt(a.R,a.G,a.B,a.A),c="string"==typeof t&&G(a,"A")||"string"!=typeof t&&G(t,"A"),s="string"==typeof t;switch(o){case r.HEX:default:return c?this.HEXA(St(u,0),e,n,s):this.HEX(St(u,0),e,n,s);case r.HSL:return c?this.HSLA(u,e,n,s,i):this.HSL(u,e,n,s,i);case r.RGB:return c?this.RGBA(u,e,n,s,i):this.RGB(u,e,n,s,i);case r.CIELab:return c?this.CIELabA(u,e,n,s,i):this.CIELab(u,e,n,s,i)}}})[r.HEX]=function(t,e,n,r){return e(t,n).map((function(t){return r?dt.HEX(Z(t.H,t.S,t.L)):yt.HEX(Z(t.H,t.S,t.L))}))},S.HEXA=function(t,n,r,i){return n(t,r).map((function(t){return i?dt.HEX(e(e({},Z(t.H,t.S,t.L)),{A:255*lt(t.A)})):yt.HEXA(e(e({},Z(t.H,t.S,t.L)),{A:lt(t.A)}))}))},S[r.RGB]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?dt.RGB(Z(t.H,t.S,t.L),i):yt.RGB(Z(t.H,t.S,t.L),i.decimals)}))},S.RGBA=function(t,n,r,i,o){return n(t,r).map((function(t){return i?dt.RGB(e(e({},Z(t.H,t.S,t.L)),{A:lt(t.A)}),o):yt.RGBA(e(e({},Z(t.H,t.S,t.L)),{A:lt(t.A)}),o.decimals)}))},S[r.HSL]=function(t,e,n,r,i){return e(t,n).map((function(t){return r?dt.HSL({H:t.H,S:t.S,L:t.L},i):yt.HSL(Z(t.H,t.S,t.L),i.decimals)}))},S.HSLA=function(t,n,r,i,o){return n(t,r).map((function(t){return i?dt.HSL(e(e({},t),{A:lt(t.A)}),o):yt.HSLA(e(e({},Z(t.H,t.S,t.L)),{A:lt(t.A)}),o.decimals)}))},S[r.CIELab]=function(t,e,n,r,i){return e(t,n).map((function(t){var e=Z(t.H,t.S,t.L);return r?dt.CIELab(et(e.R,e.G,e.B),i):yt.CIELab(e,i.decimals)}))},S.CIELabA=function(t,n,r,i,o){return n(t,r).map((function(t){var n=Z(t.H,t.S,t.L);return i?dt.CIELab(e(e({},et(n.R,n.G,n.B)),{A:lt(t.A)}),o):yt.CIELabA(e(e({},n),{A:lt(t.A)}),o.decimals)}))},S),Ft=((M={mix:function(n,r){var i,o,a,u,c,s,d,l,f,h,b,p,A,E,m,g=n.map((function(t){var e=gt(t);return vt(t,e)})),C=r===t.Mix.SUBTRACTIVE?g.map((function(t){var e,n,r,i,o,a,u,c,s,d,l,f,h,b,p=(e=t.R,n=t.G,r=t.B,i=Math.min(e,n,r),o=Math.min(255-e,255-n,255-r),a=e-i,u=n-i,c=r-i,s=Math.min(a,u),d=a-s,l=(u+s)/2,f=(c+u-s)/2,h=Math.max(d,l,f)/Math.max(a,u,c),b=isNaN(h)||h===1/0||h<=0?1:h,{R:d/b+o,Y:l/b+o,B:f/b+o});return G(t,"A")&&(p.A=t.A),p})):null;function L(n){var i=r===t.Mix.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return n.reduce((function(n,i){var o=G(i,"A")?i.A:1,a={R:Math.min(n.R+i.R*o,255),B:Math.min(n.B+i.B*o,255),A:1-(1-o)*(1-n.A)},u="G"in n?n.G:n.Y,c="G"in i?i.G:i.Y;return e(e({},a),r===t.Mix.ADDITIVE?{G:Math.min(u+c*o,255)}:{Y:Math.min(u+c*o,255)})}),i)}if(r===t.Mix.ADDITIVE)i=L(g);else{var v=L(C);o=v.R,a=v.Y,u=v.B,c=Math.min(o,a,u),s=Math.min(255-o,255-a,255-u),d=o-c,l=a-c,f=u-c,h=Math.min(l,f),b=d+l-h,p=l+h,A=2*(f-h),E=Math.max(b,p,A)/Math.max(d,l,f),m=isNaN(E)||E===1/0||E<=0?1:E,(i={R:b/m+s,G:p/m+s,B:A/m+s}).A=v.A}return{R:x(i.R),G:x(i.G),B:x(i.B),A:N(i.A,0,1)}}})[r.HEX]=function(t,e,n){var r=this.mix(t,e);return delete r.A,n?dt.HEX(r):yt.HEX(r)},M.HEXA=function(t,e,n){var r=this.mix(t,e);return r.A=n?255*lt(r.A):lt(r.A),n?dt.HEX(r):yt.HEXA(r)},M[r.RGB]=function(t,e,n,r){var i=this.mix(t,e);return delete i.A,n?dt.RGB(i,r):yt.RGB(i,r.decimals)},M.RGBA=function(t,e,n,r){var i=this.mix(t,e);return n?dt.RGB(i,r):yt.RGBA(i,r.decimals)},M[r.HSL]=function(t,e,n,r){var i=this.mix(t,e),o=tt(i.R,i.G,i.B);return delete i.A,delete o.A,n?dt.HSL(o,r):yt.HSL(i,r.decimals)},M.HSLA=function(t,e,n,r){var i=this.mix(t,e),o=tt(i.R,i.G,i.B,i.A);return n?dt.HSL(o,r):yt.HSLA(i,r.decimals)},M[r.CIELab]=function(t,e,n,r){var i=this.mix(t,e),o=et(i.R,i.G,i.B);return delete i.A,n?dt.CIELab(o,r):yt.CIELabA(i,r.decimals)},M.CIELabA=function(t,e,n,r){var i=this.mix(t,e),o=et(i.R,i.G,i.B);return G(i,"A")&&(o.A=i.A),n?dt.CIELab(o,r):yt.CIELabA(i,r.decimals)},M),Rt=function(t,n){var r=x(t.R,n),i=x(t.G,n),o=x(t.B,n);return e({R:r,G:i,B:o},G(t,"A")?{A:x(t.A,n)}:{})},St=function(t,n){return e({H:x(t.H,n),S:x(t.S,n),L:x(t.L,n)},G(t,"A")?{A:x(t.A,n)}:{})},Mt=function(t,e){return{L:x(t.L,e),a:x(t.a,e),b:x(t.b,e)}},It=function(t,e){return{C:x(t.C,e),M:x(t.M,e),Y:x(t.Y,e),K:x(t.K,e)}},Gt=function(t,e,n,r){return r(vt(t,e),n)},Ot=function(t,e,n,r,i){n<1&&(n=5);var o=function(t,e,n){var r=n-1,i=(e.R-t.R)/r,o=(e.G-t.G)/r,a=(e.B-t.B)/r,u=lt(t.A),c=(lt(e.A)-u)/r;return Array(n).fill(null).map((function(n,s){return 0===s?t:s===r?e:{R:x(t.R+i*s),G:x(t.G+o*s),B:x(t.B+a*s),A:x(u+c*s)}}))}(vt(t),vt(e),n);return o.map((function(t){return i(t,r)}))},Dt=function(){function r(t,e){void 0===e&&(e={}),this._options=V(e,t),this.rgb=vt(t),this.updateHSL(),this.updateLab(),this.updateCMYK()}return r.prototype.updateRGB=function(){this.rgb=e(e({},Z(this.hsl.H,this.hsl.S,this.hsl.L)),{A:this.hsl.A})},r.prototype.updateRGBFromCMYK=function(){this.rgb=e(e({},rt(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K)),{A:this.rgb.A})},r.prototype.updateRGBFromLab=function(){this.rgb=e(e({},nt(this.lab.L,this.lab.a,this.lab.b)),{A:this.rgb.A})},r.prototype.updateHSL=function(){this.hsl=tt(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)},r.prototype.updateLab=function(){this.lab=e(e({},et(this.rgb.R,this.rgb.G,this.rgb.B)),{A:this.rgb.A})},r.prototype.updateCMYK=function(){this.cmyk=it(this.rgb.R,this.rgb.G,this.rgb.B)},r.prototype.setOptions=function(t){return void 0===t&&(t={}),this._options=e(e({},this._options),t),this},r.prototype.setH=function(t){return this.hsl.H=U(t),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},r.prototype.setS=function(t){return this.hsl.S=N(t,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},r.prototype.setL=function(t){return this.hsl.L=N(t,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this},r.prototype.setR=function(t){this.rgb.R=N(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()},r.prototype.setG=function(t){return this.rgb.G=N(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this},r.prototype.setB=function(t){return this.rgb.B=N(t,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this},r.prototype.setCIEL=function(t){return this.lab.L=N(t,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},r.prototype.setCIEa=function(t){return this.lab.a=N(t,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},r.prototype.setCIEb=function(t){return this.lab.b=N(t,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this},r.prototype.setA=function(t){return this.hsl.A=this.rgb.A=N(t,0,1),this},r.prototype.setC=function(t){return this.cmyk.C=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},r.prototype.setM=function(t){return this.cmyk.M=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},r.prototype.setY=function(t){return this.cmyk.Y=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},r.prototype.setK=function(t){return this.cmyk.K=N(t,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this},Object.defineProperty(r.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"H",{get:function(){return x(this.hsl.H,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"S",{get:function(){return x(this.hsl.S,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"L",{get:function(){return x(this.hsl.L,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIEL",{get:function(){return x(this.lab.L,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIEa",{get:function(){return x(this.lab.a,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIEb",{get:function(){return x(this.lab.b,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"R",{get:function(){return x(this.rgb.R,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"G",{get:function(){return x(this.rgb.G,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"B",{get:function(){return x(this.rgb.B,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"A",{get:function(){return x(this.hsl.A,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"C",{get:function(){return x(this.cmyk.C,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"M",{get:function(){return x(this.cmyk.M,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"Y",{get:function(){return x(this.cmyk.Y,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"K",{get:function(){return x(this.cmyk.K,this.options.decimals)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEXObject",{get:function(){return yt.HEX(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEXAObject",{get:function(){return yt.HEXA(this.rgb)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGBObject",{get:function(){return{R:this.R,G:this.G,B:this.B}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGBAObject",{get:function(){return e(e({},this.RGBObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSLObject",{get:function(){return{H:this.H,S:this.S,L:this.L}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSLAObject",{get:function(){return e(e({},this.HSLObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIELabObject",{get:function(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIELabAObject",{get:function(){return e(e({},this.CIELabObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYKObject",{get:function(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYKAObject",{get:function(){return e(e({},this.CMYKObject),{A:this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEX",{get:function(){return dt.HEX({R:this.R,G:this.G,B:this.B})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HEXA",{get:function(){return dt.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGB",{get:function(){return dt.RGB({R:this.R,G:this.G,B:this.B},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"RGBA",{get:function(){return dt.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSL",{get:function(){return dt.HSL({H:this.H,S:this.S,L:this.L},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HSLA",{get:function(){return dt.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIELab",{get:function(){return dt.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CIELabA",{get:function(){return dt.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYK",{get:function(){return dt.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"CMYKA",{get:function(){return dt.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)},enumerable:!1,configurable:!0}),r.toHEXObject=function(t){var e=gt(t);return Gt(t,e,0,yt.HEX)},r.toHEX=function(t){return dt.HEX(r.toHEXObject(t))},r.toHEXAObject=function(t){var e=gt(t);return Gt(t,e,0,yt.HEXA)},r.toHEXA=function(t){return dt.HEX(r.toHEXAObject(t))},r.toRGBObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.RGB)},r.toRGB=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.RGB);return dt.RGB(i,r)},r.toRGBAObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.RGBA)},r.toRGBA=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.RGBA);return dt.RGB(i,r)},r.toHSLObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.HSL)},r.toHSL=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.HSL);return dt.HSL(i,r)},r.toHSLAObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.HSLA)},r.toHSLA=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.HSLA);return dt.HSL(i,r)},r.toCIELabObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.CIELab)},r.toCIELab=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.CIELab);return dt.CIELab(i,r)},r.toCIELabAObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.CIELabA)},r.toCIELabA=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.CIELabA);return dt.CIELab(i,r)},r.toCMYKObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.CMYK)},r.toCMYK=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.CMYK);return dt.CMYK(i,r)},r.toCMYKAObject=function(t,e){void 0===e&&(e={});var n=gt(t);return Gt(t,n,e.decimals,yt.CMYKA)},r.toCMYKA=function(t,e){void 0===e&&(e={});var n=gt(t),r=V(e,t),i=Gt(t,n,6,yt.CMYKA);return dt.CMYK(i,r)},r.getBlendHEXObject=function(t,e,n){return void 0===n&&(n=5),Ot(t,e,n,0,yt.HEX)},r.getBlendHEX=function(t,e,n){return void 0===n&&(n=5),r.getBlendHEXObject(t,e,n).map((function(t){return dt.HEX(t)}))},r.getBlendHEXAObject=function(t,e,n){return void 0===n&&(n=5),Ot(t,e,n,0,yt.HEXA)},r.getBlendHEXA=function(t,e,n){return void 0===n&&(n=5),r.getBlendHEXAObject(t,e,n).map((function(t){return dt.HEX(t)}))},r.getBlendRGBObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,r.decimals,yt.RGB)},r.getBlendRGB=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,6,yt.RGB).map((function(n){return dt.RGB(n,V(r,t,e))}))},r.getBlendRGBAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,r.decimals,yt.RGBA)},r.getBlendRGBA=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,6,yt.RGBA).map((function(n){return dt.RGB(n,V(r,t,e))}))},r.getBlendHSLObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,r.decimals,yt.HSL)},r.getBlendHSL=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=V(r,t,e);return Ot(t,e,n,6,yt.HSL).map((function(t){return dt.HSL(t,i)}))},r.getBlendHSLAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,r.decimals,yt.HSLA)},r.getBlendHSLA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=V(r,t,e);return Ot(t,e,n,6,yt.HSLA).map((function(t){return dt.HSL(t,i)}))},r.getBlendCIELabObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,r.decimals,yt.CIELab)},r.getBlendCIELab=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=V(r,t,e);return Ot(t,e,n,6,yt.CIELab).map((function(t){return dt.CIELab(t,i)}))},r.getBlendCIELabAObject=function(t,e,n,r){return void 0===n&&(n=5),void 0===r&&(r={}),Ot(t,e,n,r.decimals,yt.CIELabA)},r.getBlendCIELabA=function(t,e,n,r){void 0===n&&(n=5),void 0===r&&(r={});var i=V(r,t,e);return Ot(t,e,n,6,yt.CIELabA).map((function(t){return dt.CIELab(t,i)}))},r.getMixHEXObject=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),Ft.HEX(e,n,!1)},r.getMixHEX=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),Ft.HEX(e,n,!0)},r.getMixHEXAObject=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),Ft.HEXA(e,n,!1)},r.getMixHEXA=function(e,n){return void 0===n&&(n=t.Mix.ADDITIVE),Ft.HEXA(e,n,!0)},r.getMixRGBObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.RGB(e,r,!1,V.apply(void 0,n([i],e,!1)))},r.getMixRGB=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.RGB(e,r,!0,V.apply(void 0,n([i],e,!1)))},r.getMixRGBAObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.RGBA(e,r,!1,V.apply(void 0,n([i],e,!1)))},r.getMixRGBA=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.RGBA(e,r,!0,V.apply(void 0,n([i],e,!1)))},r.getMixHSLObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.HSL(e,r,!1,V.apply(void 0,n([i],e,!1)))},r.getMixHSL=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.HSL(e,r,!0,V.apply(void 0,n([i],e,!1)))},r.getMixHSLAObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.HSLA(e,r,!1,V.apply(void 0,n([i],e,!1)))},r.getMixHSLA=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.HSLA(e,r,!0,V.apply(void 0,n([i],e,!1)))},r.getMixCIELabObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.CIELab(e,r,!1,V.apply(void 0,n([i],e,!1)))},r.getMixCIELab=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.CIELab(e,r,!0,V.apply(void 0,n([i],e,!1)))},r.getMixCIELabAObject=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.CIELabA(e,r,!1,V.apply(void 0,n([i],e,!1)))},r.getMixCIELabA=function(e,r,i){return void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),Ft.CIELabA(e,r,!0,V.apply(void 0,n([i],e,!1)))},r.getShades=function(t,e,n){return void 0===n&&(n={}),Bt(t,e,!0,V(n,t))},r.getTints=function(t,e,n){return void 0===n&&(n={}),Bt(t,e,!1,V(n,t))},r.getHarmony=function(e,n,r,i){return void 0===n&&(n=t.Harmony.COMPLEMENTARY),void 0===r&&(r=t.Mix.ADDITIVE),void 0===i&&(i={}),function(e,n,r,i){var o;return(o={},o[t.Harmony.ANALOGOUS]=Ht.buildHarmony(n,ht,r,i),o[t.Harmony.COMPLEMENTARY]=Ht.buildHarmony(n,bt,r,i),o[t.Harmony.SPLIT_COMPLEMENTARY]=Ht.buildHarmony(n,pt,r,i),o[t.Harmony.TRIADIC]=Ht.buildHarmony(n,At,r,i),o[t.Harmony.TETRADIC]=Ht.buildHarmony(n,Et,r,i),o[t.Harmony.SQUARE]=Ht.buildHarmony(n,mt,r,i),o)[e]}(n,e,r,V(i,e))},r}();return t.ColorTranslator=Dt,t}({});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc