PageSourceSearch

https://tamarindreef.com/templates/general/js/utilities/colors.js

js tamarindreef.com collected 2026-10-10 02:27:53 UTC 23,207 bytes, 1 lines download raw bytes

1!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Chromath=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){var Chromath=_dereq_("./src/chromath.js");module.exports=Chromath},{"./src/chromath.js":2}],2:[function(_dereq_,module,exports){var util=_dereq_("./util");function Chromath(mixed){var channels,color,hsl,hsv,rgb;if(util.isString(mixed)||util.isNumber(mixed)){channels=Chromath.parse(mixed)}else if(util.isArray(mixed)){throw new Error("Unsure how to parse array `"+mixed+"`"+", please pass an object or CSS style "+"or try Chromath.rgb, Chromath.hsl, or Chromath.hsv")}else if(mixed instanceof Chromath){channels=util.merge({},mixed)}else if(util.isObject(mixed)){channels=util.merge({},mixed)}if(!channels)throw new Error("Could not parse `"+mixed+"`");else if(!isFinite(channels.a))channels.a=1;if("r"in channels){rgb=util.rgb.scaled01([channels.r,channels.g,channels.b]);hsl=Chromath.rgb2hsl(rgb);hsv=Chromath.rgb2hsv(rgb)}else if("h"in channels){if("l"in channels){hsl=util.hsl.scaled([channels.h,channels.s,channels.l]);rgb=Chromath.hsl2rgb(hsl);hsv=Chromath.rgb2hsv(rgb)}else if("v"in channels||"b"in channels){if("b"in channels)channels.v=channels.b;hsv=util.hsl.scaled([channels.h,channels.s,channels.v]);rgb=Chromath.hsv2rgb(hsv);hsl=Chromath.rgb2hsl(rgb)}}util.merge(this,{r:rgb[0],g:rgb[1],b:rgb[2],h:hsl[0],sl:hsl[1],l:hsl[2],sv:hsv[1],v:hsv[2],a:channels.a});return this}Chromath.rgb=function(r,g,b,a){var rgba=util.rgb.fromArgs(r,g,b,a);r=rgba[0],g=rgba[1],b=rgba[2],a=rgba[3];return new Chromath({r:r,g:g,b:b,a:a})};Chromath.rgba=Chromath.rgb;Chromath.hsl=function(h,s,l,a){var hsla=util.hsl.fromArgs(h,s,l,a);h=hsla[0],s=hsla[1],l=hsla[2],a=hsla[3];return new Chromath({h:h,s:s,l:l,a:a})};Chromath.hsla=Chromath.hsl;Chromath.hsv=function(h,s,v,a){var hsva=util.hsl.fromArgs(h,s,v,a);h=hsva[0],s=hsva[1],v=hsva[2],a=hsva[3];return new Chromath({h:h,s:s,v:v,a:a})};Chromath.hsva=Chromath.hsv;Chromath.hsb=Chromath.hsv;Chromath.hsba=Chromath.hsva;Chromath.toInteger=function(color){var hex6=new Chromath(color).hex().join("");return Number("0x"+hex6)};Chromath.toName=function(comparison){comparison=+new Chromath(comparison);for(var color in Chromath.colors)if(+Chromath[color]==comparison)return color};Chromath.rgb2hex=function rgb2hex(r,g,b){var rgb=util.rgb.scaled01(r,g,b);var hex=rgb.map(function(pct){var dec=Math.round(pct*255);var hex=dec.toString(16).toUpperCase();return util.lpad(hex,2,0)});return hex};Chromath.rgb2hsl=function rgb2hsl(r,g,b){var rgb=util.rgb.scaled01(r,g,b);r=rgb[0],g=rgb[1],b=rgb[2];var M=Math.max(r,g,b);var m=Math.min(r,g,b);var C=M-m;var L=.5*(M+m);var S=C===0?0:C/(1-Math.abs(2*L-1));var h;if(C===0)h=0;else if(M===r)h=(g-b)/C%6;else if(M===g)h=(b-r)/C+2;else if(M===b)h=(r-g)/C+4;var H=60*h;return[H,parseFloat(S),parseFloat(L)]};Chromath.rgb2hsv=function rgb2hsv(r,g,b){var rgb=util.rgb.scaled01(r,g,b);r=rgb[0],g=rgb[1],b=rgb[2];var M=Math.max(r,g,b);var m=Math.min(r,g,b);var C=M-m;var L=M;var S=C===0?0:C/M;var h;if(C===0)h=0;else if(M===r)h=(g-b)/C%6;else if(M===g)h=(b-r)/C+2;else if(M===b)h=(r-g)/C+4;var H=60*h;return[H,parseFloat(S),parseFloat(L)]};Chromath.rgb2hsb=Chromath.rgb2hsv;Chromath.hsl2rgb=function hsl2rgb(h,s,l){var hsl=util.hsl.scaled(h,s,l);h=hsl[0],s=hsl[1],l=hsl[2];var C=(1-Math.abs(2*l-1))*s;var hp=h/60;var X=C*(1-Math.abs(hp%2-1));var rgb,m;switch(Math.floor(hp)){case 0:rgb=[C,X,0];break;case 1:rgb=[X,C,0];break;case 2:rgb=[0,C,X];break;case 3:rgb=[0,X,C];break;case 4:rgb=[X,0,C];break;case 5:rgb=[C,0,X];break;default:rgb=[0,0,0]}m=l-C/2;return[rgb[0]+m,rgb[1]+m,rgb[2]+m]};Chromath.hsv2rgb=function hsv2rgb(h,s,v){var hsv=util.hsl.scaled(h,s,v);h=hsv[0],s=hsv[1],v=hsv[2];var C=v*s;var hp=h/60;var X=C*(1-Math.abs(hp%2-1));var rgb,m;if(h==undefined)rgb=[0,0,0];else if(0<=hp&&hp<1)rgb=[C,X,0];else if(1<=hp&&hp<2)rgb=[X,C,0];else if(2<=hp&&hp<3)rgb=[0,C,X];else if(3<=hp&&hp<4)rgb=[0,X,C];else if(4<=hp&&hp<5)rgb=[X,0,C];else if(5<=hp&&hp<6)rgb=[C,0,X];m=v-C;return[rgb[0]+m,rgb[1]+m,rgb[2]+m]};Chromath.hsb2rgb=Chromath.hsv2rgb;Chromath.convert={rgb:{hex:Chromath.hsv2rgb,hsl:Chromath.rgb2hsl,hsv:Chromath.rgb2hsv},hsl:{rgb:Chromath.hsl2rgb},hsv:{rgb:Chromath.hsv2rgb}};Chromath.complement=function(color){var c=new Chromath(color);var hsl=c.toHSLObject();hsl.h=(hsl.h+180)%360;return new Chromath(hsl)};Chromath.triad=function(color){var c=new Chromath(color);return[c,new Chromath({r:c.b,g:c.r,b:c.g}),new Chromath({r:c.g,g:c.b,b:c.r})]};Chromath.tetrad=function(color){var c=new Chromath(color);return[c,new Chromath({r:c.b,g:c.r,b:c.b}),new Chromath({r:c.b,g:c.g,b:c.r}),new Chromath({r:c.r,g:c.b,b:c.r})]};Chromath.analogous=function(color,results,slices){if(!isFinite(results))results=3;if(!isFinite(slices))slices=12;var c=new Chromath(color);var hsv=c.toHSVObject();var slice=360/slices;var ret=[c];hsv.h=(hsv.h-(slices*results>>
11)+720)%360;while(--results){hsv.h=(hsv.h+slice)%360;ret.push(new Chromath(hsv))}return ret};Chromath.monochromatic=function(color,results){if(!results)results=5;var c=new Chromath(color);var hsv=c.toHSVObject();var inc=1/results;var ret=[],step=0;while(step++<results){hsv.v=step*inc;ret.push(new Chromath(hsv))}return ret};Chromath.splitcomplement=function(color){var ref=new Chromath(color);var hsv=ref.toHSVObject();var a=new Chromath.hsv({h:(hsv.h+150)%360,s:hsv.s,v:hsv.v});var b=new Chromath.hsv({h:(hsv.h+210)%360,s:hsv.s,v:hsv.v});return[ref,a,b]};Chromath.tint=function(from,by){return Chromath.towards(from,"#FFFFFF",by)};Chromath.lighten=Chromath.tint;Chromath.shade=function(from,by){return Chromath.towards(from,"#000000",by)};Chromath.darken=Chromath.shade;Chromath.desaturate=function(color,formula){var c=new Chromath(color),rgb,avg;switch(formula){case 1:avg=.35+13*(c.r+c.g+c.b)/60;break;case 2:avg=(13*(c.r+c.g+c.b)+5355)/60;break;default:avg=c.r*.3+c.g*.59+c.b*.11}avg=util.clamp(avg,0,255);rgb={r:avg,g:avg,b:avg};return new Chromath(rgb)};Chromath.greyscale=Chromath.desaturate;Chromath.websafe=function(color){color=new Chromath(color);color.r=Math.round(color.r/51)*51;color.g=Math.round(color.g/51)*51;color.b=Math.round(color.b/51)*51;return new Chromath(color)};Chromath.additive=function(){var args=arguments.length-2,i=-1,a,b;while(i++<args){a=a||new Chromath(arguments[i]);b=new Chromath(arguments[i+1]);if((a.r+=b.r)>255)a.r=255;if((a.g+=b.g)>255)a.g=255;if((a.b+=b.b)>255)a.b=255;a=new Chromath(a)}return a};Chromath.subtractive=function(){var args=arguments.length-2,i=-1,a,b;while(i++<args){a=a||new Chromath(arguments[i]);b=new Chromath(arguments[i+1]);if((a.r+=b.r-255)<0)a.r=0;if((a.g+=b.g-255)<0)a.g=0;if((a.b+=b.b-255)<0)a.b=0;a=new Chromath(a)}return a};Chromath.multiply=function(){var args=arguments.length-2,i=-1,a,b;while(i++<args){a=a||new Chromath(arguments[i]);b=new Chromath(arguments[i+1]);a.r=a.r/255*b.r|0;a.g=a.g/255*b.g|0;a.b=a.b/255*b.b|0;a=new Chromath(a)}return a};Chromath.average=function(){var args=arguments.length-2,i=-1,a,b;while(i++<args){a=a||new Chromath(arguments[i]);b=new Chromath(arguments[i+1]);a.r=a.r+b.r>>1;a.g=a.g+b.g>>1;a.b=a.b+b.b>>1;a=new Chromath(a)}return a};Chromath.overlay=function(top,bottom,opacity){var a=new Chromath(top);var b=new Chromath(bottom);if(opacity>1)opacity/=100;opacity=util.clamp(opacity-1+b.a,0,1);return new Chromath({r:util.lerp(a.r,b.r,opacity),g:util.lerp(a.g,b.g,opacity),b:util.lerp(a.b,b.b,opacity)})};Chromath.towards=function(from,to,by,interpolator){if(!to){return from}if(!isFinite(by))throw new Error("TypeError: `by`("+by+") should be between 0 and 1");if(!(from instanceof Chromath))from=new Chromath(from);if(!(to instanceof Chromath))to=new Chromath(to||"#FFFFFF");if(!interpolator)interpolator=util.lerp;by=parseFloat(by);return new Chromath({r:interpolator(from.r,to.r,by),g:interpolator(from.g,to.g,by),b:interpolator(from.b,to.b,by),a:interpolator(from.a,to.a,by)})};Chromath.gradient=function(from,to,slices,slice){var gradient=[],stops;if(!slices)slices=20;stops=slices-1;if(isFinite(slice))return Chromath.towards(from,to,slice/stops);else slice=-1;while(++slice<slices){gradient.push(Chromath.towards(from,to,slice/stops))}return gradient};Chromath.parse=function(string){var parsers=Chromath.parsers,i,l,parser,parts,channels;for(i=0,l=parsers.length;i<l;i++){parser=parsers[i];parts=parser.regex.exec(string);if(parts&&parts.length)channels=parser.process.apply(this,parts);if(channels)return channels}};Chromath.parsers=_dereq_("./parsers").parsers;Chromath.prototype=_dereq_("./prototype")(Chromath);var css2Colors=_dereq_("./colornames_css2");var css3Colors=_dereq_("./colornames_css3");var allColors=util.merge({},css2Colors,css3Colors);Chromath.colors={};for(var colorName in allColors){Chromath[colorName]=Chromath.colors[colorName]=new Chromath(allColors[colorName])}Chromath.parsers.push({example:["red","burlywood"],regex:/^[a-z]+$/i,process:function(colorName){if(Chromath.colors[colorName])return Chromath.colors[colorName]}});module.exports=Chromath},{"./colornames_css2":3,"./colornames_css3":4,"./parsers":5,"./prototype":6,"./util":7}],3:[function(_dereq_,module,exports){module.exports={aqua:{r:0,g:255,b:255},black:{r:0,g:0,b:0},blue:{r:0,g:0,b:255},fuchsia:{r:255,g:0,b:255}
1,gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},lime:{r:0,g:255,b:0},maroon:{r:128,g:0,b:0},navy:{r:0,g:0,b:128},olive:{r:128,g:128,b:0},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},silver:{r:192,g:192,b:192},teal:{r:0,g:128,b:128},white:{r:255,g:255,b:255},yellow:{r:255,g:255,b:0}}},{}],4:[function(_dereq_,module,exports){module.exports={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},blanchedalmond:{r:255,g:235,b:205},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},oldlace:{r:253,g:245,b:230},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},turquoise:{r:64,g:224,b:208}
1,violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},whitesmoke:{r:245,g:245,b:245},yellowgreen:{r:154,g:205,b:50}}},{}],5:[function(_dereq_,module,exports){var util=_dereq_("./util");module.exports={parsers:[{example:[3554431,16809984],regex:/^\d+$/,process:function(color){return{r:color>>16&255,g:color>>8&255,b:color&255}}},{example:["#fb0","f0f"],regex:/^#?([\dA-F]{1})([\dA-F]{1})([\dA-F]{1})$/i,process:function(hex,r,g,b){return{r:parseInt(r+r,16),g:parseInt(g+g,16),b:parseInt(b+b,16)}}},{example:["#00ff00","336699"],regex:/^#?([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})$/i,process:function(hex,r,g,b){return{r:parseInt(r,16),g:parseInt(g,16),b:parseInt(b,16)}}},{example:["rgb(123, 234, 45)","rgb(25, 50%, 100%)","rgba(12%, 34, 56%, 0.78)"],regex:/^rgba*\(([0-9]*\.?[0-9]+\%*),\s*([0-9]*\.?[0-9]+\%*),\s*([0-9]*\.?[0-9]+\%*)(?:,\s*([0-9.]+))?\)/,process:function(s,r,g,b,a){r=r&&r.slice(-1)=="%"?r.slice(0,-1)/100:r*1;g=g&&g.slice(-1)=="%"?g.slice(0,-1)/100:g*1;b=b&&b.slice(-1)=="%"?b.slice(0,-1)/100:b*1;a=a*1;return{r:util.clamp(r,0,255),g:util.clamp(g,0,255),b:util.clamp(b,0,255),a:util.clamp(a,0,1)||undefined}}},{example:["hsl(123, 34%, 45%)","hsla(25, 50%, 100%, 0.75)","hsv(12, 34%, 56%)"],regex:/^hs([bvl])a*\((\d{1,3}\%*),\s*(\d{1,3}\%*),\s*(\d{1,3}\%*)(?:,\s*([0-9.]+))?\)/,process:function(c,lv,h,s,l,a){h*=1;s=s.slice(0,-1)/100;l=l.slice(0,-1)/100;a*=1;var obj={h:util.clamp(h,0,360),a:util.clamp(l,0,1)};obj["s"+lv]=util.clamp(s,0,1),obj[lv]=util.clamp(l,0,1);return obj}}]}},{"./util":7}],6:[function(_dereq_,module,exports){module.exports=function ChromathPrototype(Chromath){return{toName:function(){return Chromath.toName(this)},toString:function(){return this.toHexString()},valueOf:function(){return Chromath.toInteger(this)},rgb:function(){return this.toRGBArray()},toRGBArray:function(){return this.toRGBAArray().slice(0,3)},toRGBObject:function(){var rgb=this.toRGBArray();return{r:rgb[0],g:rgb[1],b:rgb[2]}},toRGBString:function(){return"rgb("+this.toRGBArray().join(",")+")"},rgba:function(){return this.toRGBAArray()},toRGBAArray:function(){var rgba=[Math.round(this.r*255),Math.round(this.g*255),Math.round(this.b*255),parseFloat(this.a)];return rgba},toRGBAObject:function(){var rgba=this.toRGBAArray();return{r:rgba[0],g:rgba[1],b:rgba[2],a:rgba[3]}},toRGBAString:function(){return"rgba("+this.toRGBAArray().join(",")+")"},hex:function(){return this.toHexArray()},toHexArray:function(){return Chromath.rgb2hex(this.r,this.g,this.b)},toHexObject:function(){var hex=this.toHexArray();return{r:hex[0],g:hex[1],b:hex[2]}},toHexString:function(){var hex=this.toHexArray();return"#"+hex.join("")},hsl:function(){return this.toHSLArray()},toHSLArray:function(){return this.toHSLAArray().slice(0,3)},toHSLObject:function(){var hsl=this.toHSLArray();return{h:hsl[0],s:hsl[1],l:hsl[2]}},toHSLString:function(){var hsla=this.toHSLAArray();var vals=[hsla[0],Math.round(hsla[1]*100)+"%",Math.round(hsla[2]*100)+"%"];return"hsl("+vals+")"},hsla:function(){return this.toHSLAArray()},toHSLAArray:function(){return[Math.round(this.h),parseFloat(this.sl),parseFloat(this.l),parseFloat(this.a)]},toHSLAObject:function(){var hsla=this.toHSLAArray();return{h:hsla[0],s:hsla[1],l:hsla[2],a:hsla[3]}},toHSLAString:function(){var hsla=this.toHSLAArray();var vals=[hsla[0],Math.round(hsla[1]*100)+"%",Math.round(hsla[2]*100)+"%",Math.round(hsla[3])];return"hsla("+vals+")"},hsv:function(){return this.toHSVArray()},toHSVArray:function(){return this.toHSVAArray().slice(0,3)},toHSVObject:function(){var hsva=this.toHSVAArray();return{h:hsva[0],s:hsva[1],v:hsva[2]}},toHSVString:function(){var hsv=this.toHSVArray();var vals=[hsv[0],Math.round(hsv[1]*100)+"%",Math.round(hsv[2]*100)+"%"];return"hsv("+vals+")"},hsva:function(){return this.toHSVAArray()},toHSVAArray:function(){return[Math.round(this.h),parseFloat(this.sv),parseFloat(this.v),parseFloat(this.a)]},toHSVAObject:function(){var hsva=this.toHSVAArray();return{h:hsva[0],s:hsva[1],l:hsva[2],a:hsva[3]}},toHSVAString:function(){var hsva=this.toHSVAArray();var vals=[hsva[0],Math.round(hsva[1]*100)+"%",Math.round(hsva[2]*100)+"%",hsva[3]];return"hsva("+vals+")"},hsb:function(){return this.hsv()},toHSBArray:function(){return this.toHSVArray()},toHSBObject:function(){return this.toHSVObject()},toHSBString:function(){return this.toHSVString()},hsba:function(){return this.hsva()},toHSBAArray:function(){return this.toHSVAArray()},toHSBAObject:function(){return this.toHSVAObject()},toHSBAString:function(){return this.toHSVAString()},complement:function(){return Chromath.complement(this)},triad:function(){return Chromath.triad(this)},tetrad:function(){return Chromath.tetrad(this)},analogous:function(results,slices){return Chromath.analogous(this,results,slices)},monochromatic:function(results){return Chromath.monochromatic(this,results)},splitcomplement:function(){return Chromath.splitcomplement(this)},tint:function(by){return Chromath.tint(this,by)},lighten:function(by){return this.tint(by)},shade:function(by){return Chromath.shade(this,by)},darken:function(by){return this.shade(by)},desaturate:function(formula){return Chromath.desaturate(this,formula)},greyscale:function(formula){return this.desaturate(formula)},websafe:function(){return Chromath.websafe(this)},additive:function(){var arr=Array.prototype.slice.call(arguments);return Chromath.additive.apply(Chromath,[this].concat(arr))},subtractive:function(){var arr=Array.prototype.slice.call(arguments);return Chromath.subtractive.apply(Chromath,[this].concat(arr))},multiply:function(){var arr=Array.prototype.slice.call(arguments);return Chromath.multiply.apply(Chromath,[this].concat(arr))},average:function(){var arr=Array.prototype.slice.call(arguments);return Chromath.average.apply(Chromath,[this].concat(arr))},overlay:function(bottom,transparency){return Chromath.overlay(this,bottom,transparency)},clone:function(){return new Chromath(this)},towards:function(to,by){return Chromath.towards(this,to,by)}
1,gradient:function(to,slices,slice){return Chromath.gradient(this,to,slices,slice)}}}},{}],7:[function(_dereq_,module,exports){var util={};util.clamp=function(val,min,max){if(val>max)return max;if(val<min)return min;return val};util.merge=function(){var dest=arguments[0],i=1,source,prop;while(source=arguments[i++])for(prop in source)dest[prop]=source[prop];return dest};util.isArray=function(test){return Object.prototype.toString.call(test)==="[object Array]"};util.isString=function(test){return Object.prototype.toString.call(test)==="[object String]"};util.isNumber=function(test){return Object.prototype.toString.call(test)==="[object Number]"};util.isObject=function(test){return Object.prototype.toString.call(test)==="[object Object]"};util.lpad=function(val,len,pad){val=val.toString();if(!len)len=2;if(!pad)pad="0";while(val.length<len)val=pad+val;return val};util.lerp=function(from,to,by){return from+(to-from)*by};util.times=function(n,fn,context){for(var i=0,results=[];i<n;i++){results[i]=fn.call(context,i)}return results};util.rgb={fromArgs:function(r,g,b,a){var rgb=arguments[0];if(util.isArray(rgb)){r=rgb[0];g=rgb[1];b=rgb[2];a=rgb[3]}if(util.isObject(rgb)){r=rgb.r;g=rgb.g;b=rgb.b;a=rgb.a}return[r,g,b,a]},scaled01:function(r,g,b){if(!isFinite(arguments[1])){var rgb=util.rgb.fromArgs(r,g,b);r=rgb[0],g=rgb[1],b=rgb[2]}if(r>1)r/=255;if(g>1)g/=255;if(b>1)b/=255;return[r,g,b]},pctWithSymbol:function(r,g,b){var rgb=this.scaled01(r,g,b);return rgb.map(function(v){return Math.round(v*255)+"%"})}};util.hsl={fromArgs:function(h,s,l,a){var hsl=arguments[0];if(util.isArray(hsl)){h=hsl[0];s=hsl[1];l=hsl[2];a=hsl[3]}if(util.isObject(hsl)){h=hsl.h;s=hsl.s;l=hsl.l||hsl.v;a=hsl.a}return[h,s,l,a]},scaled:function(h,s,l){if(!isFinite(arguments[1])){var hsl=util.hsl.fromArgs(h,s,l);h=hsl[0],s=hsl[1],l=hsl[2]}h=(h%360+360)%360;if(s>1)s/=100;if(l>1)l/=100;return[h,s,l]}};module.exports=util},{}]},{},[1])(1)});function colorManager(){this.init=function(baseColor){var thisStart="";var thisStop="";var startColor="";var stopColor="";jQuery("[DATA-COLORSTART]").each(function(){thisStart=jQuery(this).attr("DATA-COLORSTART");thisStop=jQuery(this).attr("DATA-COLORSTOP");startColor=myColorManager.shadeColor(baseColor,thisStart);if(typeof thisStop!==typeof undefined&&thisStop!==false){stopColor=myColorManager.shadeColor(baseColor,thisStop);jQuery(this).css("background","linear-gradient(to bottom,"+startColor+" 0%,"+stopColor+" 100%)")}else{jQuery(this).css("color",startColor)}});jQuery("[DATA-COLOR]").each(function(){colorData=jQuery(this).attr("DATA-COLOR");thisColor=myColorManager.shadeColor(baseColor,colorData);jQuery(this).css("color",thisColor)})};this.shadeColor=function(color,percent){var returnHex=color;var thisPct=parseInt(percent);if(isNaN(thisPct))return color;thisPct=thisPct/100;if(thisPct===0){returnHex="#"+color}else if(thisPct<0){thisPct=thisPct*-1;returnHex=new Chromath(color).lighten(thisPct).toString()}else{returnHex=new Chromath(color).shade(thisPct).toString()}return returnHex};this.hex2RGB=function(hex){var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;hex=hex.replace(shorthandRegex,function(m,r,g,b){return r+r+g+g+b+b});var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);return result?{r:parseInt(result[1],16),g:parseInt(result[2],16),b:parseInt(result[3],16)}:null}}myColorManager=new colorManager;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.