Socket
Socket
Sign inDemoInstall

onecolor

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onecolor - npm Package Compare versions

Comparing version 2.5.0 to 3.0.0

index.js

61

one-color-all.js

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

(function(e,t,n,r,i,s,o,u,a){function m(e){if(Object.prototype.toString.apply(e)==="[object Array]"){if(typeof e[0]=="string"&&typeof m[e[0]]=="function")return new m[e[0]](e.slice(1,e.length));if(e.length===4)return new m.RGB(e[0]/255,e[1]/255,e[2]/255,e[3]/255)}else if(typeof e=="string"){var i=e.toLowerCase();l[i]&&(e="#"+l[i]),i==="transparent"&&(e="rgba(0,0,0,0)");var s=e.match(v);if(s){var o=s[1].toUpperCase(),u=c(s[8])?s[8]:n(s[8]),a=o[0]==="H",f=s[3]?100:a?360:255,h=s[5]||a?100:255,d=s[7]||a?100:255;if(c(m[o]))throw new Error("one.color."+o+" is not installed.");return new m[o](n(s[2])/f,n(s[4])/h,n(s[6])/d,u)}e.length<6&&(e=e.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var g=e.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(g)return new m.RGB(r(g[1],16)/255,r(g[2],16)/255,r(g[3],16)/255);if(m.CMYK){var y=e.match(new t("^cmyk\\("+p.source+","+p.source+","+p.source+","+p.source+"\\)$","i"));if(y)return new m.CMYK(n(y[1])/100,n(y[2])/100,n(y[3])/100,n(y[4])/100)}}else if(typeof e=="object"&&e.isColor)return e;return!1}function g(t,n,r){function a(e,t){var n={};n[t.toLowerCase()]=new i("return this.rgb()."+t.toLowerCase()+"();"),m[t].propertyNames.forEach(function(e,r){n[e]=n[e==="black"?"k":e[0]]=new i("value","isDelta","return this."+t.toLowerCase()+"()."+e+"(value, isDelta);")});for(var r in n)n.hasOwnProperty(r)&&m[e].prototype[r]===undefined&&(m[e].prototype[r]=n[r])}m[t]=new i(n.join(","),"if (Object.prototype.toString.apply("+n[0]+") === '[object Array]') {"+n.map(function(e,t){return e+"="+n[0]+"["+t+"];"}).reverse().join("")+"}"+"if ("+n.filter(function(e){return e!=="alpha"}).map(function(e){return"isNaN("+e+")"}).join("||")+"){"+'throw new Error("['+t+']: Invalid color: ("+'+n.join('+","+')+'+")");}'+n.map(function(e){return e==="hue"?"this._hue=hue<0?hue-Math.floor(hue):hue%1":e==="alpha"?"this._alpha=(isNaN(alpha)||alpha>1)?1:(alpha<0?0:alpha);":"this._"+e+"="+e+"<0?0:("+e+">1?1:"+e+")"}).join(";")+";"),m[t].propertyNames=n;var s=m[t].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(e){s[e]=s[e]||(t==="RGB"?s.hex:new i("return this.rgb()."+e+"();"))}),s.isColor=!0,s.equals=function(r,i){c(i)&&(i=1e-10),r=r[t.toLowerCase()]();for(var s=0;s<n.length;s+=1)if(e.abs(this["_"+n[s]]-r["_"+n[s]])>i)return!1;return!0},s.toJSON=new i("return ['"+t+"', "+n.map(function(e){return"this._"+e},this).join(", ")+"];");for(var o in r)if(r.hasOwnProperty(o)){var u=o.match(/^from(.*)$/);u?m[u[1].toUpperCase()].prototype[t.toLowerCase()]=r[o]:s[o]=r[o]}s[t.toLowerCase()]=function(){return this},s.toString=new i('return "[one.color.'+t+':"+'+n.map(function(e,t){return'" '+n[t]+'="+this._'+e}).join("+")+'+"]";'),n.forEach(function(e,t){s[e]=s[e==="black"?"k":e[0]]=new i("value","isDelta","if (typeof value === 'undefined') {return this._"+e+";"+"}"+"if (isDelta) {"+"return new this.constructor("+n.map(function(t,n){return"this._"+t+(e===t?"+value":"")}).join(", ")+");"+"}"+"return new this.constructor("+n.map(function(t,n){return e===t?"value":"this._"+t}).join(", ")+");")}),f.forEach(function(e){a(t,e),a(e,t)}),f.push(t)}function y(){var e=this.rgb(),t=e._red*.3+e._green*.59+e._blue*.11;return new m.RGB(t,t,t,this._alpha)}var f=[],l={},c=function(e){return typeof e=="undefined"},h=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,p=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,d=/\s*(\.\d+|\d+(?:\.\d+)?)\s*/,v=new t("^(rgb|hsl|hsv)a?\\("+h.source+","+h.source+","+h.source+"(?:,"+d.source+")?"+"\\)$","i");m.installMethod=function(e,t){f.forEach(function(n){m[n].prototype[e]=t})},g("RGB",["red","green","blue","alpha"],{hex:function(){var e=(o(255*this._red)*65536+o(255*this._green)*256+o(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-e.length)+e},hexa:function(){var e=o(this._alpha*255).toString(16);return"#"+"00".substr(0,2-e.length)+e+this.hex().substr(1,6)},css:function(){return"rgb("+o(255*this._red)+","+o(255*this._green)+","+o(255*this._blue)+")"},cssa:function(){return"rgba("+o(255*this._red)+","+o(255*this._green)+","+o(255*this._blue)+","+this._alpha+")"}}),typeof define=="function"&&!c(define.amd)?define(function(){return m}):typeof exports=="object"?module.exports=m:(one=window.one||{},one.color=m),typeof jQuery!="undefined"&&c(jQuery.color)&&(jQuery.color=m),l={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},g("XYZ",["x","y","z","alpha"],{fromRgb:function(){var e=function(e){return e>.04045?u((e+.055)/1.055,2.4):e/12.92},t=e(this._red),n=e(this._green),r=e(this._blue);return new m.XYZ(t*.4124564+n*.3575761+r*.1804375,t*.2126729+n*.7151522+r*.072175,t*.0193339+n*.119192+r*.9503041,this._alpha)},rgb:function(){var e=this._x,t=this._y,n=this._z,r=function(e){return e>.0031308?1.055*u(e,1/2.4)-.055:12.92*e};return new m.RGB(r(e*3.2404542+t*-1.5371385+n*-0.4985314),r(e*-0.969266+t*1.8760108+n*.041556),r(e*.0556434+t*-0.2040259+n*1.0572252),this._alpha)},lab:function(){var e=function(e){return e>.008856?u(e,1/3):7.787037*e+4/29},t=e(this._x/95.047),n=e(this._y/100),r=e(this._z/108.883);return new m.LAB(116*n-16,500*(t-n),200*(n-r),this._alpha)}}),g("LAB",["l","a","b","alpha"],{fromRgb:function(){return this.xyz().lab()},rgb:function(){return this.xyz().rgb()},xyz:function(){var e=function(e){var t=u(e,3);return t>.008856?t:(e-16/116)/7.87},t=(this._l+16)/116,n=this._a/500+t,r=t-this._b/200;return new m.XYZ(e(n)*95.047,e(t)*100,e(r)*108.883,this._alpha)}}),g("HSV",["hue","saturation","value","alpha"],{rgb:function(){var t=this._hue,n=this._saturation,r=this._value,i=a(5,e.floor(t*6)),s=t*6-i,o=r*(1-n),u=r*(1-s*n),f=r*(1-(1-s)*n),l,c,h;switch(i){case 0:l=r,c=f,h=o;break;case 1:l=u,c=r,h=o;break;case 2:l=o,c=r,h=f;break;case 3:l=o,c=u,h=r;break;case 4:l=f,c=o,h=r;break;case 5:l=r,c=o,h=u}return new m.RGB(l,c,h,this._alpha)},hsl:function(){var e=(2-this._saturation)*this._value,t=this._saturation*this._value,n=e<=1?e:2-e,r;return n<1e-9?r=0:r=t/n,new m.HSL(this._hue,r,e/2,this._alpha)},fromRgb:function(){var t=this._red,n=this._green,r=this._blue,i=e.max(t,n,r),s=a(t,n,r),o=i-s,u,f=i===0?0:o/i,l=i;if(o===0)u=0;else switch(i){case t:u=(n-r)/o/6+(n<r?1:0);break;case n:u=(r-t)/o/6+1/3;break;case r:u=(t-n)/o/6+2/3}return new m.HSV(u,f,l,this._alpha)}}),g("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var e=this._lightness*2,t=this._saturation*(e<=1?e:2-e),n;return e+t<1e-9?n=0:n=2*t/(e+t),new m.HSV(this._hue,n,(e+t)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}}),g("CMYK",["cyan","magenta","yellow","black","alpha"],{rgb:function(){return new m.RGB(1-this._cyan*(1-this._black)-this._black,1-this._magenta*(1-this._black)-this._black,1-this._yellow*(1-this._black)-this._black,this._alpha)},fromRgb:function(){var e=this._red,t=this._green,n=this._blue,r=1-e,i=1-t,s=1-n,o=1;return e||t||n?(o=a(r,a(i,s)),r=(r-o)/(1-o),i=(i-o)/(1-o),s=(s-o)/(1-o)):o=1,new m.CMYK(r,i,s,o,this._alpha)}}),m.installMethod("clearer",function(e){return this.alpha(s(e)?-0.1:-e,!0)}),m.installMethod("darken",function(e){return this.lightness(s(e)?-0.1:-e,!0)}),m.installMethod("desaturate",function(e){return this.saturation(s(e)?-0.1:-e,!0)}),m.installMethod("greyscale",y),m.installMethod("grayscale",y),m.installMethod("lighten",function(e){return this.lightness(s(e)?.1:e,!0)}),m.installMethod("mix",function(e,t){e=m(e).rgb(),t=1-(s(t)?.5:t);var n=t*2-1,r=this._alpha-e._alpha,i=((n*r===-1?n:(n+r)/(1+n*r))+1)/2,o=1-i,u=this.rgb();return new m.RGB(u._red*i+e._red*o,u._green*i+e._green*o,u._blue*i+e._blue*o,u._alpha*t+e._alpha*(1-t))}),m.installMethod("negate",function(){var e=this.rgb();return new m.RGB(1-e._red,1-e._green,1-e._blue,this._alpha)}),m.installMethod("opaquer",function(e){return this.alpha(s(e)?.1:e,!0)}),m.installMethod("rotate",function(e){return this.hue((e||0)/360,!0)}),m.installMethod("saturate",function(e){return this.saturation(s(e)?.1:e,!0)}),m.installMethod("toAlpha",function(e){var t=this.rgb(),n=m(e).rgb(),r=1e-10,i=new m.RGB(0,0,0,t._alpha),s=["_red","_green","_blue"];return s.forEach(function(e){t[e]<r?i[e]=t[e]:t[e]>n[e]?i[e]=(t[e]-n[e])/(1-n[e]):t[e]>n[e]?i[e]=(n[e]-t[e])/n[e]:i[e]=0}),i._red>i._green?i._red>i._blue?t._alpha=i._red:t._alpha=i._blue:i._green>i._blue?t._alpha=i._green:t._alpha=i._blue,t._alpha<r?t:(s.forEach(function(e){t[e]=(t[e]-n[e])/t._alpha+n[e]}),t._alpha*=i._alpha,t)})})(Math,RegExp,parseFloat,parseInt,Function,isNaN,Math.round,Math.pow,Math.min)
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.one || (g.one = {})).color = f()}})(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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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(require,module,exports){
module.exports=require(7).use(require(6)).use(require(5)).use(require(4)).use(require(3)).use(require(2)).use(require(14)).use(require(8)).use(require(9)).use(require(10)).use(require(11)).use(require(12)).use(require(13)).use(require(15)).use(require(16)).use(require(17)).use(require(18)).use(require(19));
},{"10":10,"11":11,"12":12,"13":13,"14":14,"15":15,"16":16,"17":17,"18":18,"19":19,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9}],2:[function(require,module,exports){
module.exports=function(t){t.installColorSpace("CMYK",["cyan","magenta","yellow","black","alpha"],{rgb:function(){return new t.RGB(1-this._cyan*(1-this._black)-this._black,1-this._magenta*(1-this._black)-this._black,1-this._yellow*(1-this._black)-this._black,this._alpha)},fromRgb:function(){var a=this._red,i=this._green,h=this._blue,l=1-a,n=1-i,s=1-h,e=1;return a||i||h?(e=Math.min(l,Math.min(n,s)),l=(l-e)/(1-e),n=(n-e)/(1-e),s=(s-e)/(1-e)):e=1,new t.CMYK(l,n,s,e,this._alpha)}})};
},{}],3:[function(require,module,exports){
module.exports=function(t){t.use(require(4)),t.installColorSpace("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var s,n=2*this._lightness,h=this._saturation*(1>=n?n:2-n);return s=1e-9>n+h?0:2*h/(n+h),new t.HSV(this._hue,s,(n+h)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})};
},{"4":4}],4:[function(require,module,exports){
module.exports=function(a){a.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var e,t,s,h=this._hue,i=this._saturation,r=this._value,n=Math.min(5,Math.floor(6*h)),u=6*h-n,c=r*(1-i),l=r*(1-u*i),o=r*(1-(1-u)*i);switch(n){case 0:e=r,t=o,s=c;break;case 1:e=l,t=r,s=c;break;case 2:e=c,t=r,s=o;break;case 3:e=c,t=l,s=r;break;case 4:e=o,t=c,s=r;break;case 5:e=r,t=c,s=l}return new a.RGB(e,t,s,this._alpha)},hsl:function(){var e,t=(2-this._saturation)*this._value,s=this._saturation*this._value,h=1>=t?t:2-t;return e=1e-9>h?0:s/h,new a.HSL(this._hue,e,t/2,this._alpha)},fromRgb:function(){var e,t=this._red,s=this._green,h=this._blue,i=Math.max(t,s,h),r=Math.min(t,s,h),n=i-r,u=0===i?0:n/i,c=i;if(0===n)e=0;else switch(i){case t:e=(s-h)/n/6+(h>s?1:0);break;case s:e=(h-t)/n/6+1/3;break;case h:e=(t-s)/n/6+2/3}return new a.HSV(e,u,c,this._alpha)}})};
},{}],5:[function(require,module,exports){
module.exports=function(t){t.use(require(6)),t.installColorSpace("LAB",["l","a","b","alpha"],{fromRgb:function(){return this.xyz().lab()},rgb:function(){return this.xyz().rgb()},xyz:function(){var r=function(t){var r=Math.pow(t,3);return r>.008856?r:(t-16/116)/7.87},n=(this._l+16)/116,i=this._a/500+n,a=n-this._b/200;return new t.XYZ(95.047*r(i),100*r(n),108.883*r(a),this._alpha)}})};
},{"6":6}],6:[function(require,module,exports){
module.exports=function(t){t.installColorSpace("XYZ",["x","y","z","alpha"],{fromRgb:function(){var n=function(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92},r=n(this._red),i=n(this._green),h=n(this._blue);return new t.XYZ(.4124564*r+.3575761*i+.1804375*h,.2126729*r+.7151522*i+.072175*h,.0193339*r+.119192*i+.9503041*h,this._alpha)},rgb:function(){var t=this._x,n=this._y,r=this._z,i=function(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t};return new colorRGB(i(3.2404542*t+-1.5371385*n+r*-.4985314),i(t*-.969266+1.8760108*n+.041556*r),i(.0556434*t+n*-.2040259+1.0572252*r),this._alpha)},lab:function(){var n=function(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29},r=n(this._x/95.047),i=n(this._y/100),h=n(this._z/108.883);return new t.LAB(116*i-16,500*(r-i),200*(i-h),this._alpha)}})};
},{}],7:[function(require,module,exports){
function color(r){if(Array.isArray(r)){if("string"==typeof r[0]&&"function"==typeof color[r[0]])return new color[r[0]](r.slice(1,r.length));if(4===r.length)return new color.RGB(r[0]/255,r[1]/255,r[2]/255,r[3]/255)}else if("string"==typeof r){var o=r.toLowerCase();color.namedColors[o]&&(r="#"+color.namedColors[o]),"transparent"===o&&(r="rgba(0,0,0,0)");var e=r.match(cssColorRegExp);if(e){var t=e[1].toUpperCase(),n=undef(e[8])?e[8]:parseFloat(e[8]),a="H"===t[0],s=e[3]?100:a?360:255,i=e[5]||a?100:255,c=e[7]||a?100:255;if(undef(color[t]))throw new Error("color."+t+" is not installed.");return new color[t](parseFloat(e[2])/s,parseFloat(e[4])/i,parseFloat(e[6])/c,n)}r.length<6&&(r=r.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var l=r.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(l)return new color.RGB(parseInt(l[1],16)/255,parseInt(l[2],16)/255,parseInt(l[3],16)/255);if(color.CMYK){var u=r.match(new RegExp("^cmyk\\("+percentageChannelRegExp.source+","+percentageChannelRegExp.source+","+percentageChannelRegExp.source+","+percentageChannelRegExp.source+"\\)$","i"));if(u)return new color.CMYK(parseFloat(u[1])/100,parseFloat(u[2])/100,parseFloat(u[3])/100,parseFloat(u[4])/100)}}else if("object"==typeof r&&r.isColor)return r;return!1}var installedColorSpaces=[],undef=function(r){return"undefined"==typeof r},channelRegExp=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,percentageChannelRegExp=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,alphaChannelRegExp=/\s*(\.\d+|\d+(?:\.\d+)?)\s*/,cssColorRegExp=new RegExp("^(rgb|hsl|hsv)a?\\("+channelRegExp.source+","+channelRegExp.source+","+channelRegExp.source+"(?:,"+alphaChannelRegExp.source+")?\\)$","i");color.namedColors={},color.installColorSpace=function(r,o,e){function t(r,o){var e={};e[o.toLowerCase()]=function(){return this.rgb()[o.toLowerCase()]()},color[o].propertyNames.forEach(function(r){var t="black"===r?"k":r.charAt(0);e[r]=e[t]=function(e,t){return this[o.toLowerCase()]()[r](e,t)}});for(var t in e)e.hasOwnProperty(t)&&void 0===color[r].prototype[t]&&(color[r].prototype[t]=e[t])}color[r]=function(e){var t=Array.isArray(e)?e:arguments;o.forEach(function(e,n){var a=t[n];if("alpha"===e)this._alpha=isNaN(a)||a>1?1:0>a?0:a;else{if(isNaN(a))throw new Error("["+r+"]: Invalid color: ("+o.join(",")+")");"hue"===e?this._hue=0>a?a-Math.floor(a):a%1:this["_"+e]=0>a?0:a>1?1:a}},this)},color[r].propertyNames=o;var n=color[r].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(o){n[o]=n[o]||("RGB"===r?n.hex:function(){return this.rgb()[o]()})}),n.isColor=!0,n.equals=function(e,t){undef(t)&&(t=1e-10),e=e[r.toLowerCase()]();for(var n=0;n<o.length;n+=1)if(Math.abs(this["_"+o[n]]-e["_"+o[n]])>t)return!1;return!0},n.toJSON=function(){return[r].concat(o.map(function(r){return this["_"+r]},this))};for(var a in e)if(e.hasOwnProperty(a)){var s=a.match(/^from(.*)$/);s?color[s[1].toUpperCase()].prototype[r.toLowerCase()]=e[a]:n[a]=e[a]}return n[r.toLowerCase()]=function(){return this},n.toString=function(){return"["+r+" "+o.map(function(r){return this["_"+r]}).join(", ")+"]"},o.forEach(function(r){var e="black"===r?"k":r.charAt(0);n[r]=n[e]=function(e,t){return"undefined"==typeof e?this["_"+r]:new this.constructor(t?o.map(function(o){return this["_"+o]+(r===o?e:0)},this):o.map(function(o){return r===o?e:this["_"+o]},this))}}),installedColorSpaces.forEach(function(o){t(r,o),t(o,r)}),installedColorSpaces.push(r),color},color.pluginByName={},color.use=function(r){var o=r.name;return"string"==typeof o&&this.pluginByName[o]||(this.pluginByName[o]=r,r(color)),color},color.installMethod=function(r,o){installedColorSpaces.forEach(function(e){color[e].prototype[r]=o})},color.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var r=(65536*Math.round(255*this._red)+256*Math.round(255*this._green)+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-r.length)+r},hexa:function(){var r=Math.round(255*this._alpha).toString(16);return"#"+"00".substr(0,2-r.length)+r+this.hex().substr(1,6)},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}}),module.exports=color;
},{}],8:[function(require,module,exports){
module.exports=function(t){t.installMethod("clearer",function(t){return this.alpha(isNaN(t)?-.1:-t,!0)})};
},{}],9:[function(require,module,exports){
module.exports=function(e){e.use(require(3)),e.installMethod("darken",function(e){return this.lightness(isNaN(e)?-.1:-e,!0)})};
},{"3":3}],10:[function(require,module,exports){
module.exports=function(t){t.use(require(3)),t.installMethod("desaturate",function(t){return this.saturation(isNaN(t)?-.1:-t,!0)})};
},{"3":3}],11:[function(require,module,exports){
module.exports=function(e){function t(){var t=this.rgb(),l=.3*t._red+.59*t._green+.11*t._blue;return new e.RGB(l,l,l,this._alpha)}e.installMethod("greyscale",t),e.installMethod("grayscale",t)};
},{}],12:[function(require,module,exports){
module.exports=function(e){e.use(require(3)),e.installMethod("lighten",function(e){return this.lightness(isNaN(e)?.1:e,!0)})};
},{"3":3}],13:[function(require,module,exports){
module.exports=function(o){o.installMethod("mix",function(r,e){r=o(r).rgb(),e=1-(isNaN(e)?.5:e);var l=2*e-1,t=this._alpha-othercolor._alpha,h=((l*t===-1?l:(l+t)/(1+l*t))+1)/2,a=1-h,_=this.rgb();return new o.RGB(_._red*h+othercolor._red*a,_._green*h+othercolor._green*a,_._blue*h+othercolor._blue*a,_._alpha*e+othercolor._alpha*(1-e))})};
},{}],14:[function(require,module,exports){
module.exports=function(e){e.namedColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}};
},{}],15:[function(require,module,exports){
module.exports=function(e){e.installMethod("negate",function(){var n=this.rgb();return new e.RGB(1-n._red,1-n._green,1-n._blue,this._alpha)})};
},{}],16:[function(require,module,exports){
module.exports=function(t){t.installMethod("opaquer",function(t){return this.alpha(isNaN(t)?.1:t,!0)})};
},{}],17:[function(require,module,exports){
module.exports=function(e){e.use(require(3)),e.installMethod("rotate",function(e){return this.hue((e||0)/360,!0)})};
},{"3":3}],18:[function(require,module,exports){
module.exports=function(t){t.use(require(3)),t.installMethod("saturate",function(t){return this.saturation(isNaN(t)?.1:t,!0)})};
},{"3":3}],19:[function(require,module,exports){
module.exports=function(e){e.installMethod("toAlpha",function(e){var _=this.rgb(),a=e(e).rgb(),r=1e-10,l=new e.RGB(0,0,0,_._alpha),n=["_red","_green","_blue"];return n.forEach(function(e){l[e]=_[e]<r?_[e]:_[e]>a[e]?(_[e]-a[e])/(1-a[e]):_[e]>a[e]?(a[e]-_[e])/a[e]:0}),_._alpha=l._red>l._green?l._red>l._blue?l._red:l._blue:l._green>l._blue?l._green:l._blue,_._alpha<r?_:(n.forEach(function(e){_[e]=(_[e]-a[e])/_._alpha+a[e]}),_._alpha*=l._alpha,_)})};
},{}]},{},[1])(1)
});
//# sourceMappingURL=one-color-all.map

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

(function(e,t,n,r,i,s,o){function d(r){if(Object.prototype.toString.apply(r)==="[object Array]"){if(typeof r[0]=="string"&&typeof d[r[0]]=="function")return new d[r[0]](r.slice(1,r.length));if(r.length===4)return new d.RGB(r[0]/255,r[1]/255,r[2]/255,r[3]/255)}else if(typeof r=="string"){var i=r.toLowerCase();a[i]&&(r="#"+a[i]),i==="transparent"&&(r="rgba(0,0,0,0)");var s=r.match(p);if(s){var o=s[1].toUpperCase(),u=f(s[8])?s[8]:t(s[8]),l=o[0]==="H",h=s[3]?100:l?360:255,v=s[5]||l?100:255,m=s[7]||l?100:255;if(f(d[o]))throw new Error("one.color."+o+" is not installed.");return new d[o](t(s[2])/h,t(s[4])/v,t(s[6])/m,u)}r.length<6&&(r=r.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var g=r.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(g)return new d.RGB(n(g[1],16)/255,n(g[2],16)/255,n(g[3],16)/255);if(d.CMYK){var y=r.match(new e("^cmyk\\("+c.source+","+c.source+","+c.source+","+c.source+"\\)$","i"));if(y)return new d.CMYK(t(y[1])/100,t(y[2])/100,t(y[3])/100,t(y[4])/100)}}else if(typeof r=="object"&&r.isColor)return r;return!1}function v(e,t,n){function l(e,t){var n={};n[t.toLowerCase()]=new r("return this.rgb()."+t.toLowerCase()+"();"),d[t].propertyNames.forEach(function(e,i){n[e]=n[e==="black"?"k":e[0]]=new r("value","isDelta","return this."+t.toLowerCase()+"()."+e+"(value, isDelta);")});for(var i in n)n.hasOwnProperty(i)&&d[e].prototype[i]===undefined&&(d[e].prototype[i]=n[i])}d[e]=new r(t.join(","),"if (Object.prototype.toString.apply("+t[0]+") === '[object Array]') {"+t.map(function(e,n){return e+"="+t[0]+"["+n+"];"}).reverse().join("")+"}"+"if ("+t.filter(function(e){return e!=="alpha"}).map(function(e){return"isNaN("+e+")"}).join("||")+"){"+'throw new Error("['+e+']: Invalid color: ("+'+t.join('+","+')+'+")");}'+t.map(function(e){return e==="hue"?"this._hue=hue<0?hue-Math.floor(hue):hue%1":e==="alpha"?"this._alpha=(isNaN(alpha)||alpha>1)?1:(alpha<0?0:alpha);":"this._"+e+"="+e+"<0?0:("+e+">1?1:"+e+")"}).join(";")+";"),d[e].propertyNames=t;var s=d[e].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(t){s[t]=s[t]||(e==="RGB"?s.hex:new r("return this.rgb()."+t+"();"))}),s.isColor=!0,s.equals=function(n,r){f(r)&&(r=1e-10),n=n[e.toLowerCase()]();for(var s=0;s<t.length;s+=1)if(i.abs(this["_"+t[s]]-n["_"+t[s]])>r)return!1;return!0},s.toJSON=new r("return ['"+e+"', "+t.map(function(e){return"this._"+e},this).join(", ")+"];");for(var o in n)if(n.hasOwnProperty(o)){var a=o.match(/^from(.*)$/);a?d[a[1].toUpperCase()].prototype[e.toLowerCase()]=n[o]:s[o]=n[o]}s[e.toLowerCase()]=function(){return this},s.toString=new r('return "[one.color.'+e+':"+'+t.map(function(e,n){return'" '+t[n]+'="+this._'+e}).join("+")+'+"]";'),t.forEach(function(e,n){s[e]=s[e==="black"?"k":e[0]]=new r("value","isDelta","if (typeof value === 'undefined') {return this._"+e+";"+"}"+"if (isDelta) {"+"return new this.constructor("+t.map(function(t,n){return"this._"+t+(e===t?"+value":"")}).join(", ")+");"+"}"+"return new this.constructor("+t.map(function(t,n){return e===t?"value":"this._"+t}).join(", ")+");")}),u.forEach(function(t){l(e,t),l(t,e)}),u.push(e)}var u=[],a={},f=function(e){return typeof e=="undefined"},l=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,c=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,h=/\s*(\.\d+|\d+(?:\.\d+)?)\s*/,p=new e("^(rgb|hsl|hsv)a?\\("+l.source+","+l.source+","+l.source+"(?:,"+h.source+")?"+"\\)$","i");d.installMethod=function(e,t){u.forEach(function(n){d[n].prototype[e]=t})},v("RGB",["red","green","blue","alpha"],{hex:function(){var e=(s(255*this._red)*65536+s(255*this._green)*256+s(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-e.length)+e},hexa:function(){var e=s(this._alpha*255).toString(16);return"#"+"00".substr(0,2-e.length)+e+this.hex().substr(1,6)},css:function(){return"rgb("+s(255*this._red)+","+s(255*this._green)+","+s(255*this._blue)+")"},cssa:function(){return"rgba("+s(255*this._red)+","+s(255*this._green)+","+s(255*this._blue)+","+this._alpha+")"}}),typeof define=="function"&&!f(define.amd)?define(function(){return d}):typeof exports=="object"?module.exports=d:(one=window.one||{},one.color=d),typeof jQuery!="undefined"&&f(jQuery.color)&&(jQuery.color=d),v("HSV",["hue","saturation","value","alpha"],{rgb:function(){var e=this._hue,t=this._saturation,n=this._value,r=o(5,i.floor(e*6)),s=e*6-r,u=n*(1-t),a=n*(1-s*t),f=n*(1-(1-s)*t),l,c,h;switch(r){case 0:l=n,c=f,h=u;break;case 1:l=a,c=n,h=u;break;case 2:l=u,c=n,h=f;break;case 3:l=u,c=a,h=n;break;case 4:l=f,c=u,h=n;break;case 5:l=n,c=u,h=a}return new d.RGB(l,c,h,this._alpha)},hsl:function(){var e=(2-this._saturation)*this._value,t=this._saturation*this._value,n=e<=1?e:2-e,r;return n<1e-9?r=0:r=t/n,new d.HSL(this._hue,r,e/2,this._alpha)},fromRgb:function(){var e=this._red,t=this._green,n=this._blue,r=i.max(e,t,n),s=o(e,t,n),u=r-s,a,f=r===0?0:u/r,l=r;if(u===0)a=0;else switch(r){case e:a=(t-n)/u/6+(t<n?1:0);break;case t:a=(n-e)/u/6+1/3;break;case n:a=(e-t)/u/6+2/3}return new d.HSV(a,f,l,this._alpha)}}),v("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var e=this._lightness*2,t=this._saturation*(e<=1?e:2-e),n;return e+t<1e-9?n=0:n=2*t/(e+t),new d.HSV(this._hue,n,(e+t)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})})(RegExp,parseFloat,parseInt,Function,Math,Math.round,Math.min)
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.one || (g.one = {})).color = f()}})(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);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.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(require,module,exports){
module.exports=function(t){t.use(require(2)),t.installColorSpace("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var s,n=2*this._lightness,h=this._saturation*(1>=n?n:2-n);return s=1e-9>n+h?0:2*h/(n+h),new t.HSV(this._hue,s,(n+h)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})};
},{"2":2}],2:[function(require,module,exports){
module.exports=function(a){a.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var e,t,s,h=this._hue,i=this._saturation,r=this._value,n=Math.min(5,Math.floor(6*h)),u=6*h-n,c=r*(1-i),l=r*(1-u*i),o=r*(1-(1-u)*i);switch(n){case 0:e=r,t=o,s=c;break;case 1:e=l,t=r,s=c;break;case 2:e=c,t=r,s=o;break;case 3:e=c,t=l,s=r;break;case 4:e=o,t=c,s=r;break;case 5:e=r,t=c,s=l}return new a.RGB(e,t,s,this._alpha)},hsl:function(){var e,t=(2-this._saturation)*this._value,s=this._saturation*this._value,h=1>=t?t:2-t;return e=1e-9>h?0:s/h,new a.HSL(this._hue,e,t/2,this._alpha)},fromRgb:function(){var e,t=this._red,s=this._green,h=this._blue,i=Math.max(t,s,h),r=Math.min(t,s,h),n=i-r,u=0===i?0:n/i,c=i;if(0===n)e=0;else switch(i){case t:e=(s-h)/n/6+(h>s?1:0);break;case s:e=(h-t)/n/6+1/3;break;case h:e=(t-s)/n/6+2/3}return new a.HSV(e,u,c,this._alpha)}})};
},{}],3:[function(require,module,exports){
function color(r){if(Array.isArray(r)){if("string"==typeof r[0]&&"function"==typeof color[r[0]])return new color[r[0]](r.slice(1,r.length));if(4===r.length)return new color.RGB(r[0]/255,r[1]/255,r[2]/255,r[3]/255)}else if("string"==typeof r){var o=r.toLowerCase();color.namedColors[o]&&(r="#"+color.namedColors[o]),"transparent"===o&&(r="rgba(0,0,0,0)");var e=r.match(cssColorRegExp);if(e){var t=e[1].toUpperCase(),n=undef(e[8])?e[8]:parseFloat(e[8]),a="H"===t[0],s=e[3]?100:a?360:255,i=e[5]||a?100:255,c=e[7]||a?100:255;if(undef(color[t]))throw new Error("color."+t+" is not installed.");return new color[t](parseFloat(e[2])/s,parseFloat(e[4])/i,parseFloat(e[6])/c,n)}r.length<6&&(r=r.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var l=r.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(l)return new color.RGB(parseInt(l[1],16)/255,parseInt(l[2],16)/255,parseInt(l[3],16)/255);if(color.CMYK){var u=r.match(new RegExp("^cmyk\\("+percentageChannelRegExp.source+","+percentageChannelRegExp.source+","+percentageChannelRegExp.source+","+percentageChannelRegExp.source+"\\)$","i"));if(u)return new color.CMYK(parseFloat(u[1])/100,parseFloat(u[2])/100,parseFloat(u[3])/100,parseFloat(u[4])/100)}}else if("object"==typeof r&&r.isColor)return r;return!1}var installedColorSpaces=[],undef=function(r){return"undefined"==typeof r},channelRegExp=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,percentageChannelRegExp=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,alphaChannelRegExp=/\s*(\.\d+|\d+(?:\.\d+)?)\s*/,cssColorRegExp=new RegExp("^(rgb|hsl|hsv)a?\\("+channelRegExp.source+","+channelRegExp.source+","+channelRegExp.source+"(?:,"+alphaChannelRegExp.source+")?\\)$","i");color.namedColors={},color.installColorSpace=function(r,o,e){function t(r,o){var e={};e[o.toLowerCase()]=function(){return this.rgb()[o.toLowerCase()]()},color[o].propertyNames.forEach(function(r){var t="black"===r?"k":r.charAt(0);e[r]=e[t]=function(e,t){return this[o.toLowerCase()]()[r](e,t)}});for(var t in e)e.hasOwnProperty(t)&&void 0===color[r].prototype[t]&&(color[r].prototype[t]=e[t])}color[r]=function(e){var t=Array.isArray(e)?e:arguments;o.forEach(function(e,n){var a=t[n];if("alpha"===e)this._alpha=isNaN(a)||a>1?1:0>a?0:a;else{if(isNaN(a))throw new Error("["+r+"]: Invalid color: ("+o.join(",")+")");"hue"===e?this._hue=0>a?a-Math.floor(a):a%1:this["_"+e]=0>a?0:a>1?1:a}},this)},color[r].propertyNames=o;var n=color[r].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(o){n[o]=n[o]||("RGB"===r?n.hex:function(){return this.rgb()[o]()})}),n.isColor=!0,n.equals=function(e,t){undef(t)&&(t=1e-10),e=e[r.toLowerCase()]();for(var n=0;n<o.length;n+=1)if(Math.abs(this["_"+o[n]]-e["_"+o[n]])>t)return!1;return!0},n.toJSON=function(){return[r].concat(o.map(function(r){return this["_"+r]},this))};for(var a in e)if(e.hasOwnProperty(a)){var s=a.match(/^from(.*)$/);s?color[s[1].toUpperCase()].prototype[r.toLowerCase()]=e[a]:n[a]=e[a]}return n[r.toLowerCase()]=function(){return this},n.toString=function(){return"["+r+" "+o.map(function(r){return this["_"+r]}).join(", ")+"]"},o.forEach(function(r){var e="black"===r?"k":r.charAt(0);n[r]=n[e]=function(e,t){return"undefined"==typeof e?this["_"+r]:new this.constructor(t?o.map(function(o){return this["_"+o]+(r===o?e:0)},this):o.map(function(o){return r===o?e:this["_"+o]},this))}}),installedColorSpaces.forEach(function(o){t(r,o),t(o,r)}),installedColorSpaces.push(r),color},color.pluginByName={},color.use=function(r){var o=r.name;return"string"==typeof o&&this.pluginByName[o]||(this.pluginByName[o]=r,r(color)),color},color.installMethod=function(r,o){installedColorSpaces.forEach(function(e){color[e].prototype[r]=o})},color.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var r=(65536*Math.round(255*this._red)+256*Math.round(255*this._green)+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-r.length)+r},hexa:function(){var r=Math.round(255*this._alpha).toString(16);return"#"+"00".substr(0,2-r.length)+r+this.hex().substr(1,6)},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}}),module.exports=color;
},{}],4:[function(require,module,exports){
module.exports=require(3).use(require(2)).use(require(1));
},{"1":1,"2":2,"3":3}]},{},[4])(4)
});
//# sourceMappingURL=one-color.map

57

package.json

@@ -5,9 +5,11 @@ {

"repository": "git@github.com:One-com/one-color.git",
"version": "2.5.0",
"version": "3.0.0",
"keywords": [
"ender",
"color",
"colour",
"requirejs",
"amd"
"conversion",
"rgb",
"hsv",
"hsl",
"cmyk"
],

@@ -20,3 +22,3 @@ "maintainers": [

{
"name": "Andreas Lind Petersen",
"name": "Andreas Lind",
"email": "andreas@one.com"

@@ -26,8 +28,11 @@ }

"devDependencies": {
"assetgraph": "=1.0.1",
"assetgraph-builder": "=1.0.3",
"jamjs": "=0.2.17",
"optimist": "=0.3.1",
"uglify-js": "=2.4.15",
"vows": "=0.7.0"
"browserify": "13.0.0",
"bundle-collapser": "1.2.1",
"coveralls": "2.11.8",
"exorcist": "0.4.0",
"istanbul": "0.4.2",
"mocha": "2.4.5",
"mocha-lcov-reporter": "1.2.0",
"uglifyify": "3.0.1",
"unexpected": "10.10.8"
},

@@ -38,7 +43,9 @@ "engines": {

"files": [
"one-color-all-debug.js",
"one-color.js",
"one-color.map",
"one-color-all.js",
"one-color-debug.js",
"one-color.js",
"one-color-ieshim.js"
"one-color-all.map",
"index.js",
"minimal.js",
"lib"
],

@@ -48,18 +55,14 @@ "publishConfig": {

},
"main": "one-color-all-debug.js",
"ender": "lib/ender.js",
"scripts": {
"postpublish": "jam publish",
"test": "vows"
"build": "browserify -p bundle-collapser/plugin -t uglifyify --debug -e index -s one.color | exorcist one-color-all.map > one-color-all.js && browserify -p bundle-collapser/plugin -t uglifyify --debug -e minimal -s one.color | exorcist one-color.map > one-color.js",
"preversion": "npm run build && npm test",
"test": "mocha",
"coverage": "istanbul cover _mocha -- --reporter dot",
"travis": "npm run build && npm run coverage"
},
"jam": {
"jspm": {
"dependencies": {},
"main": "one-color-all.js",
"include": [
"one-color.js",
"one-color-all.js",
"one-color-ieshim.js",
"README.md",
"LICENSE"
]
"jspmPackage": true
}
}
one.color
=========
[![NPM version](https://badge.fury.io/js/one-color.svg)](http://badge.fury.io/js/one-color)
[![Build Status](https://travis-ci.org/One-com/one-color.svg?branch=master)](https://travis-ci.org/One-com/one-color)
[![Coverage Status](https://img.shields.io/coveralls/One-com/one-color.svg)](https://coveralls.io/r/One-com/one-color?branch=master)
[![Dependency Status](https://david-dm.org/One-com/one-color.svg)](https://david-dm.org/One-com/one-color)

@@ -20,3 +24,2 @@ JavaScript color calculation toolkit for node.js and the browser.

* AMD / RequireJS
* jQuery (installs itself on $.color)
* Vanilla JS (installs itself on one.color)

@@ -28,6 +31,2 @@

WARNING IE USERS:
This library uses some modern ecmascript methods that aren't available in IE versions below IE9.
To keep the core library small, these methods aren't polyfilled in the library itself.
If you want IE support for older IE versions, please include <a href="//raw.github.com/One-com/one-color/master/one-color-ieshim.js">one-color-ieshim.js</a> before the color library. This is only needed if you don't already have a library installed that polyfills `Array.prototype.map`and `Array.prototype.forEach`.

@@ -301,3 +300,3 @@ Usage

npm install
make
npm run build
```

@@ -308,6 +307,4 @@

* Basic library: <a href="//raw.github.com/One-com/one-color/master/one-color.js">one-color.js</a>,
debuggable version: <a href="//raw.github.com/One-com/one-color/master/one-color-debug.js">one-color-debug.js</a>
* Full library including named color support: <a href="//raw.github.com/One-com/one-color/master/one-color-all.js">one-color-all.js</a>,
debuggable version: <a href="//raw.github.com/One-com/one-color/master/one-color-all-debug.js">one-color-all-debug.js</a>.
* Basic library: <a href="//raw.github.com/One-com/one-color/master/one-color.js">one-color.js</a>
* Full library including named color support: <a href="//raw.github.com/One-com/one-color/master/one-color-all.js">one-color-all.js</a>

@@ -317,2 +314,2 @@ License

one.color is licensed under a standard 2-clause BSD license -- see the LICENSE-file for details.
one.color is licensed under a standard 2-clause BSD license -- see the `LICENSE` file for details.
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