-
Notifications
You must be signed in to change notification settings - Fork 40
/
one-color-all.js.map
1 lines (1 loc) · 45.2 KB
/
one-color-all.js.map
1
{"version":3,"file":"one-color-all.js","sources":["lib/color.js","lib/XYZ.js","lib/HSV.js","lib/HSL.js","lib/plugins/luminance.js","lib/plugins/isDark.js","index.js","lib/LAB.js","lib/CMYK.js","lib/plugins/namedColors.js","lib/plugins/clearer.js","lib/plugins/contrast.js","lib/plugins/darken.js","lib/plugins/desaturate.js","lib/plugins/grayscale.js","lib/plugins/isLight.js","lib/plugins/lighten.js","lib/plugins/mix.js","lib/plugins/negate.js","lib/plugins/opaquer.js","lib/plugins/rotate.js","lib/plugins/saturate.js","lib/plugins/toAlpha.js"],"sourcesContent":["var installedColorSpaces = [];\nvar undef = function (obj) {\n return typeof obj === 'undefined';\n};\nvar channelRegExp = /\\s*(\\.\\d+|\\d+(?:\\.\\d+)?)(%|deg)?\\s*/;\nvar percentageChannelRegExp = /\\s*(\\.\\d+|100|\\d?\\d(?:\\.\\d+)?)%\\s*/;\nvar cssColorRegExp = new RegExp(\n '^(rgb|hsl|hsv)a?' +\n '\\\\(' +\n channelRegExp.source +\n '[, ]' +\n channelRegExp.source +\n '[, ]' +\n channelRegExp.source +\n '(?:[,/]' +\n channelRegExp.source +\n ')?' +\n '\\\\)$',\n 'i'\n);\n\nfunction divisor(unit, channelNumber, hasHue) {\n if (unit === '%') {\n return 100;\n } else if (unit === 'deg' || (hasHue && channelNumber === 0)) {\n return 360;\n } else if (!unit) {\n return 255;\n }\n}\n\nfunction color(obj) {\n if (Array.isArray(obj)) {\n if (typeof obj[0] === 'string' && typeof color[obj[0]] === 'function') {\n // Assumed array from .toJSON()\n return new color[obj[0]](obj.slice(1, obj.length));\n } else if (obj.length === 4) {\n // Assumed 4 element int RGB array from canvas with all channels [0;255]\n return new color.RGB(\n obj[0] / 255,\n obj[1] / 255,\n obj[2] / 255,\n obj[3] / 255\n );\n }\n } else if (typeof obj === 'string') {\n var lowerCased = obj.toLowerCase();\n if (color.namedColors[lowerCased]) {\n obj = '#' + color.namedColors[lowerCased];\n }\n if (lowerCased === 'transparent') {\n obj = 'rgba(0,0,0,0)';\n }\n // Test for CSS rgb(....) string\n var matchCssSyntax = obj.match(cssColorRegExp);\n if (matchCssSyntax) {\n var colorSpaceName = matchCssSyntax[1].toUpperCase();\n var hasHue = colorSpaceName[0] === 'H';\n if (undef(color[colorSpaceName])) {\n throw new Error('color.' + colorSpaceName + ' is not installed.');\n }\n\n let alpha = undef(matchCssSyntax[8]) ? 1 : undefined;\n if (alpha === undefined) {\n if (matchCssSyntax[9] === '%') {\n alpha = parseFloat(matchCssSyntax[8]) / 100;\n } else {\n alpha = parseFloat(matchCssSyntax[8]);\n }\n }\n return new color[colorSpaceName](\n parseFloat(matchCssSyntax[2]) / divisor(matchCssSyntax[3], 0, hasHue),\n parseFloat(matchCssSyntax[4]) / divisor(matchCssSyntax[5], 1, hasHue),\n parseFloat(matchCssSyntax[6]) / divisor(matchCssSyntax[7], 2, hasHue),\n alpha\n );\n }\n // Assume hex syntax\n if (obj.length < 6) {\n // Allow CSS shorthand\n obj = obj.replace(\n /^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,\n '$1$1$2$2$3$3$4$4'\n );\n }\n // Split obj into the red, green, blue, and optionally alpha component\n var hexMatch = obj.match(\n /^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])?$/i\n );\n\n if (hexMatch) {\n return new color.RGB(\n parseInt(hexMatch[1], 16) / 255,\n parseInt(hexMatch[2], 16) / 255,\n parseInt(hexMatch[3], 16) / 255,\n hexMatch[4] ? parseInt(hexMatch[4], 16) / 255 : 1\n );\n }\n\n // No match so far. Lets try the less likely ones\n if (color.CMYK) {\n var cmykMatch = obj.match(\n new RegExp(\n '^cmyk' +\n '\\\\(' +\n percentageChannelRegExp.source +\n ',' +\n percentageChannelRegExp.source +\n ',' +\n percentageChannelRegExp.source +\n ',' +\n percentageChannelRegExp.source +\n '\\\\)$',\n 'i'\n )\n );\n if (cmykMatch) {\n return new color.CMYK(\n parseFloat(cmykMatch[1]) / 100,\n parseFloat(cmykMatch[2]) / 100,\n parseFloat(cmykMatch[3]) / 100,\n parseFloat(cmykMatch[4]) / 100\n );\n }\n }\n } else if (typeof obj === 'object' && obj.isColor) {\n return obj;\n }\n return false;\n}\n\ncolor.namedColors = {};\n\ncolor.installColorSpace = function (colorSpaceName, propertyNames, config) {\n color[colorSpaceName] = function (a1) {\n // ...\n var args = Array.isArray(a1) ? a1 : arguments;\n propertyNames.forEach(function (propertyName, i) {\n var propertyValue = args[i];\n if (propertyName === 'alpha') {\n this._alpha =\n isNaN(propertyValue) || propertyValue > 1\n ? 1\n : propertyValue < 0\n ? 0\n : propertyValue;\n } else {\n if (isNaN(propertyValue)) {\n throw new Error(\n '[' +\n colorSpaceName +\n ']: Invalid color: (' +\n propertyNames.join(',') +\n ')'\n );\n }\n if (propertyName === 'hue') {\n this._hue =\n propertyValue < 0\n ? propertyValue - Math.floor(propertyValue)\n : propertyValue % 1;\n } else {\n this['_' + propertyName] =\n propertyValue < 0 ? 0 : propertyValue > 1 ? 1 : propertyValue;\n }\n }\n }, this);\n };\n color[colorSpaceName].propertyNames = propertyNames;\n\n var prototype = color[colorSpaceName].prototype;\n\n ['valueOf', 'hex', 'hexa', 'css', 'cssa'].forEach(function (methodName) {\n prototype[methodName] =\n prototype[methodName] ||\n (colorSpaceName === 'RGB'\n ? prototype.hex\n : function () {\n return this.rgb()[methodName]();\n });\n });\n\n prototype.isColor = true;\n\n prototype.equals = function (otherColor, epsilon) {\n if (undef(epsilon)) {\n epsilon = 1e-10;\n }\n\n otherColor = otherColor[colorSpaceName.toLowerCase()]();\n\n for (var i = 0; i < propertyNames.length; i = i + 1) {\n if (\n Math.abs(\n this['_' + propertyNames[i]] - otherColor['_' + propertyNames[i]]\n ) > epsilon\n ) {\n return false;\n }\n }\n\n return true;\n };\n\n prototype.toJSON = function () {\n return [colorSpaceName].concat(\n propertyNames.map(function (propertyName) {\n return this['_' + propertyName];\n }, this)\n );\n };\n\n for (var propertyName in config) {\n if (Object.prototype.hasOwnProperty.call(config, propertyName)) {\n var matchFromColorSpace = propertyName.match(/^from(.*)$/);\n if (matchFromColorSpace) {\n color[matchFromColorSpace[1].toUpperCase()].prototype[\n colorSpaceName.toLowerCase()\n ] = config[propertyName];\n } else {\n prototype[propertyName] = config[propertyName];\n }\n }\n }\n\n // It is pretty easy to implement the conversion to the same color space:\n prototype[colorSpaceName.toLowerCase()] = function () {\n return this;\n };\n prototype.toString = function () {\n return (\n '[' +\n colorSpaceName +\n ' ' +\n propertyNames\n .map(function (propertyName) {\n return this['_' + propertyName];\n }, this)\n .join(', ') +\n ']'\n );\n };\n\n // Generate getters and setters\n propertyNames.forEach(function (propertyName) {\n var shortName = propertyName === 'black' ? 'k' : propertyName.charAt(0);\n prototype[propertyName] = prototype[shortName] = function (value, isDelta) {\n // Simple getter mode: color.red()\n if (typeof value === 'undefined') {\n return this['_' + propertyName];\n } else if (isDelta) {\n // Adjuster: color.red(+.2, true)\n return new this.constructor(\n propertyNames.map(function (otherPropertyName) {\n return (\n this['_' + otherPropertyName] +\n (propertyName === otherPropertyName ? value : 0)\n );\n }, this)\n );\n } else {\n // Setter: color.red(.2);\n return new this.constructor(\n propertyNames.map(function (otherPropertyName) {\n return propertyName === otherPropertyName\n ? value\n : this['_' + otherPropertyName];\n }, this)\n );\n }\n };\n });\n\n function installForeignMethods(targetColorSpaceName, sourceColorSpaceName) {\n var obj = {};\n obj[sourceColorSpaceName.toLowerCase()] = function () {\n return this.rgb()[sourceColorSpaceName.toLowerCase()]();\n };\n color[sourceColorSpaceName].propertyNames.forEach(function (propertyName) {\n var shortName = propertyName === 'black' ? 'k' : propertyName.charAt(0);\n obj[propertyName] = obj[shortName] = function (value, isDelta) {\n return this[sourceColorSpaceName.toLowerCase()]()[propertyName](\n value,\n isDelta\n );\n };\n });\n for (var prop in obj) {\n if (\n Object.prototype.hasOwnProperty.call(obj, prop) &&\n color[targetColorSpaceName].prototype[prop] === undefined\n ) {\n color[targetColorSpaceName].prototype[prop] = obj[prop];\n }\n }\n }\n\n installedColorSpaces.forEach(function (otherColorSpaceName) {\n installForeignMethods(colorSpaceName, otherColorSpaceName);\n installForeignMethods(otherColorSpaceName, colorSpaceName);\n });\n\n installedColorSpaces.push(colorSpaceName);\n return color;\n};\n\ncolor.pluginList = [];\n\ncolor.use = function (plugin) {\n if (color.pluginList.indexOf(plugin) === -1) {\n this.pluginList.push(plugin);\n plugin(color);\n }\n return color;\n};\n\ncolor.installMethod = function (name, fn) {\n installedColorSpaces.forEach(function (colorSpace) {\n color[colorSpace].prototype[name] = fn;\n });\n return this;\n};\n\ncolor.installColorSpace('RGB', ['red', 'green', 'blue', 'alpha'], {\n hex: function () {\n var hexString = (\n Math.round(255 * this._red) * 0x10000 +\n Math.round(255 * this._green) * 0x100 +\n Math.round(255 * this._blue)\n ).toString(16);\n return '#' + '00000'.substr(0, 6 - hexString.length) + hexString;\n },\n\n hexa: function () {\n var alphaString = Math.round(this._alpha * 255).toString(16);\n return this.hex() + '00'.substr(0, 2 - alphaString.length) + alphaString;\n },\n\n css: function () {\n return (\n 'rgb(' +\n Math.round(255 * this._red) +\n ',' +\n Math.round(255 * this._green) +\n ',' +\n Math.round(255 * this._blue) +\n ')'\n );\n },\n\n cssa: function () {\n return (\n 'rgba(' +\n Math.round(255 * this._red) +\n ',' +\n Math.round(255 * this._green) +\n ',' +\n Math.round(255 * this._blue) +\n ',' +\n this._alpha +\n ')'\n );\n },\n});\n\nmodule.exports = color;\n","module.exports = function XYZ(color) {\n color.installColorSpace('XYZ', ['x', 'y', 'z', 'alpha'], {\n fromRgb: function () {\n // http://www.easyrgb.com/index.php?X=MATH&H=02#text2\n var convert = function (channel) {\n return channel > 0.04045\n ? Math.pow((channel + 0.055) / 1.055, 2.4)\n : channel / 12.92;\n };\n var r = convert(this._red);\n var g = convert(this._green);\n var b = convert(this._blue);\n\n // Reference white point sRGB D65:\n // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n return new color.XYZ(\n r * 0.4124564 + g * 0.3575761 + b * 0.1804375,\n r * 0.2126729 + g * 0.7151522 + b * 0.072175,\n r * 0.0193339 + g * 0.119192 + b * 0.9503041,\n this._alpha\n );\n },\n\n rgb: function () {\n // http://www.easyrgb.com/index.php?X=MATH&H=01#text1\n var x = this._x;\n var y = this._y;\n var z = this._z;\n var convert = function (channel) {\n return channel > 0.0031308\n ? 1.055 * Math.pow(channel, 1 / 2.4) - 0.055\n : 12.92 * channel;\n };\n\n // Reference white point sRGB D65:\n // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html\n return new color.RGB(\n convert(x * 3.2404542 + y * -1.5371385 + z * -0.4985314),\n convert(x * -0.969266 + y * 1.8760108 + z * 0.041556),\n convert(x * 0.0556434 + y * -0.2040259 + z * 1.0572252),\n this._alpha\n );\n },\n\n lab: function () {\n // http://www.easyrgb.com/index.php?X=MATH&H=07#text7\n var convert = function (channel) {\n return channel > 0.008856\n ? Math.pow(channel, 1 / 3)\n : 7.787037 * channel + 4 / 29;\n };\n var x = convert(this._x / 95.047);\n var y = convert(this._y / 100.0);\n var z = convert(this._z / 108.883);\n\n return new color.LAB(\n 116 * y - 16,\n 500 * (x - y),\n 200 * (y - z),\n this._alpha\n );\n },\n });\n};\n","module.exports = function HSV(color) {\n color.installColorSpace('HSV', ['hue', 'saturation', 'value', 'alpha'], {\n rgb: function () {\n var hue = this._hue;\n var saturation = this._saturation;\n var value = this._value;\n var i = Math.min(5, Math.floor(hue * 6));\n var f = hue * 6 - i;\n var p = value * (1 - saturation);\n var q = value * (1 - f * saturation);\n var t = value * (1 - (1 - f) * saturation);\n var red;\n var green;\n var blue;\n switch (i) {\n case 0:\n red = value;\n green = t;\n blue = p;\n break;\n case 1:\n red = q;\n green = value;\n blue = p;\n break;\n case 2:\n red = p;\n green = value;\n blue = t;\n break;\n case 3:\n red = p;\n green = q;\n blue = value;\n break;\n case 4:\n red = t;\n green = p;\n blue = value;\n break;\n case 5:\n red = value;\n green = p;\n blue = q;\n break;\n }\n return new color.RGB(red, green, blue, this._alpha);\n },\n\n hsl: function () {\n var l = (2 - this._saturation) * this._value;\n var sv = this._saturation * this._value;\n var svDivisor = l <= 1 ? l : 2 - l;\n var saturation;\n\n // Avoid division by zero when lightness approaches zero:\n if (svDivisor < 1e-9) {\n saturation = 0;\n } else {\n saturation = sv / svDivisor;\n }\n return new color.HSL(this._hue, saturation, l / 2, this._alpha);\n },\n\n fromRgb: function () {\n // Becomes one.color.RGB.prototype.hsv\n var red = this._red;\n var green = this._green;\n var blue = this._blue;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var delta = max - min;\n var hue;\n var saturation = max === 0 ? 0 : delta / max;\n var value = max;\n if (delta === 0) {\n hue = 0;\n } else {\n switch (max) {\n case red:\n hue = (green - blue) / delta / 6 + (green < blue ? 1 : 0);\n break;\n case green:\n hue = (blue - red) / delta / 6 + 1 / 3;\n break;\n case blue:\n hue = (red - green) / delta / 6 + 2 / 3;\n break;\n }\n }\n return new color.HSV(hue, saturation, value, this._alpha);\n },\n });\n};\n","module.exports = function HSL(color) {\n color.use(require('./HSV'));\n\n color.installColorSpace('HSL', ['hue', 'saturation', 'lightness', 'alpha'], {\n hsv: function () {\n // Algorithm adapted from http://wiki.secondlife.com/wiki/Color_conversion_scripts\n var l = this._lightness * 2;\n var s = this._saturation * (l <= 1 ? l : 2 - l);\n var saturation;\n\n // Avoid division by zero when l + s is very small (approaching black):\n if (l + s < 1e-9) {\n saturation = 0;\n } else {\n saturation = (2 * s) / (l + s);\n }\n\n return new color.HSV(this._hue, saturation, (l + s) / 2, this._alpha);\n },\n\n rgb: function () {\n return this.hsv().rgb();\n },\n\n fromRgb: function () {\n // Becomes one.color.RGB.prototype.hsv\n return this.hsv().hsl();\n },\n });\n};\n","module.exports = function luminance(color) {\n // http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\n function channelLuminance(value) {\n return value <= 0.03928\n ? value / 12.92\n : Math.pow((value + 0.055) / 1.055, 2.4);\n }\n\n color.installMethod('luminance', function () {\n var rgb = this.rgb();\n return (\n 0.2126 * channelLuminance(rgb._red) +\n 0.7152 * channelLuminance(rgb._green) +\n 0.0722 * channelLuminance(rgb._blue)\n );\n });\n};\n","module.exports = function isDark(color) {\n color.installMethod('isDark', function () {\n var rgb = this.rgb();\n\n // YIQ equation from http://24ways.org/2010/calculating-color-contrast\n var yiq =\n (rgb._red * 255 * 299 + rgb._green * 255 * 587 + rgb._blue * 255 * 114) /\n 1000;\n return yiq < 128;\n });\n};\n","module.exports = require('./lib/color')\n .use(require('./lib/XYZ'))\n .use(require('./lib/LAB'))\n .use(require('./lib/HSV'))\n .use(require('./lib/HSL'))\n .use(require('./lib/CMYK'))\n\n // Convenience functions\n .use(require('./lib/plugins/namedColors'))\n .use(require('./lib/plugins/clearer.js'))\n .use(require('./lib/plugins/contrast.js'))\n .use(require('./lib/plugins/darken.js'))\n .use(require('./lib/plugins/desaturate.js'))\n .use(require('./lib/plugins/grayscale.js'))\n .use(require('./lib/plugins/isDark.js'))\n .use(require('./lib/plugins/isLight.js'))\n .use(require('./lib/plugins/lighten.js'))\n .use(require('./lib/plugins/luminance.js'))\n .use(require('./lib/plugins/mix.js'))\n .use(require('./lib/plugins/negate.js'))\n .use(require('./lib/plugins/opaquer.js'))\n .use(require('./lib/plugins/rotate.js'))\n .use(require('./lib/plugins/saturate.js'))\n .use(require('./lib/plugins/toAlpha.js'));\n","module.exports = function LAB(color) {\n color.use(require('./XYZ.js'));\n\n color.installColorSpace('LAB', ['l', 'a', 'b', 'alpha'], {\n fromRgb: function () {\n return this.xyz().lab();\n },\n\n rgb: function () {\n return this.xyz().rgb();\n },\n\n xyz: function () {\n // http://www.easyrgb.com/index.php?X=MATH&H=08#text8\n var convert = function (channel) {\n var pow = Math.pow(channel, 3);\n return pow > 0.008856 ? pow : (channel - 16 / 116) / 7.87;\n };\n var y = (this._l + 16) / 116;\n var x = this._a / 500 + y;\n var z = y - this._b / 200;\n\n return new color.XYZ(\n convert(x) * 95.047,\n convert(y) * 100.0,\n convert(z) * 108.883,\n this._alpha\n );\n },\n });\n};\n","module.exports = function CMYK(color) {\n color.installColorSpace(\n 'CMYK',\n ['cyan', 'magenta', 'yellow', 'black', 'alpha'],\n {\n rgb: function () {\n return new color.RGB(\n 1 - this._cyan * (1 - this._black) - this._black,\n 1 - this._magenta * (1 - this._black) - this._black,\n 1 - this._yellow * (1 - this._black) - this._black,\n this._alpha\n );\n },\n\n fromRgb: function () {\n // Becomes one.color.RGB.prototype.cmyk\n // Adapted from http://www.javascripter.net/faq/rgb2cmyk.htm\n var red = this._red;\n var green = this._green;\n var blue = this._blue;\n var cyan = 1 - red;\n var magenta = 1 - green;\n var yellow = 1 - blue;\n var black = 1;\n if (red || green || blue) {\n black = Math.min(cyan, Math.min(magenta, yellow));\n cyan = (cyan - black) / (1 - black);\n magenta = (magenta - black) / (1 - black);\n yellow = (yellow - black) / (1 - black);\n } else {\n black = 1;\n }\n return new color.CMYK(cyan, magenta, yellow, black, this._alpha);\n },\n }\n );\n};\n","module.exports = function namedColors(color) {\n color.namedColors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '0ff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '00f',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '0ff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgrey: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'f0f',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n grey: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32',\n };\n};\n","module.exports = function clearer(color) {\n color.installMethod('clearer', function (amount) {\n return this.alpha(isNaN(amount) ? -0.1 : -amount, true);\n });\n};\n","module.exports = function contrast(color) {\n // http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\n color.use(require('./luminance'));\n\n color.installMethod('contrast', function (color2) {\n var lum1 = this.luminance();\n var lum2 = color2.luminance();\n if (lum1 > lum2) {\n return (lum1 + 0.05) / (lum2 + 0.05);\n }\n\n return (lum2 + 0.05) / (lum1 + 0.05);\n });\n};\n","module.exports = function darken(color) {\n color.use(require('../HSL'));\n\n color.installMethod('darken', function (amount) {\n return this.lightness(isNaN(amount) ? -0.1 : -amount, true);\n });\n};\n","module.exports = function desaturate(color) {\n color.use(require('../HSL'));\n\n color.installMethod('desaturate', function (amount) {\n return this.saturation(isNaN(amount) ? -0.1 : -amount, true);\n });\n};\n","module.exports = function grayscale(color) {\n function gs() {\n /* jslint strict:false */\n var rgb = this.rgb();\n var val = rgb._red * 0.3 + rgb._green * 0.59 + rgb._blue * 0.11;\n\n return new color.RGB(val, val, val, rgb._alpha);\n }\n\n color.installMethod('greyscale', gs).installMethod('grayscale', gs);\n};\n","module.exports = function isLight(color) {\n color.use(require('./isDark'));\n\n color.installMethod('isLight', function () {\n return !this.isDark();\n });\n};\n","module.exports = function lighten(color) {\n color.use(require('../HSL'));\n\n color.installMethod('lighten', function (amount) {\n return this.lightness(isNaN(amount) ? 0.1 : amount, true);\n });\n};\n","module.exports = function mix(color) {\n color.installMethod('mix', function (otherColor, weight) {\n otherColor = color(otherColor).rgb();\n weight = 1 - (isNaN(weight) ? 0.5 : weight);\n\n var w = weight * 2 - 1;\n var a = this._alpha - otherColor._alpha;\n var weight1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2;\n var weight2 = 1 - weight1;\n var rgb = this.rgb();\n\n return new color.RGB(\n rgb._red * weight1 + otherColor._red * weight2,\n rgb._green * weight1 + otherColor._green * weight2,\n rgb._blue * weight1 + otherColor._blue * weight2,\n rgb._alpha * weight + otherColor._alpha * (1 - weight)\n );\n });\n};\n","module.exports = function negate(color) {\n color.installMethod('negate', function () {\n var rgb = this.rgb();\n return new color.RGB(\n 1 - rgb._red,\n 1 - rgb._green,\n 1 - rgb._blue,\n this._alpha\n );\n });\n};\n","module.exports = function opaquer(color) {\n color.installMethod('opaquer', function (amount) {\n return this.alpha(isNaN(amount) ? 0.1 : amount, true);\n });\n};\n","module.exports = function rotate(color) {\n color.use(require('../HSL'));\n\n color.installMethod('rotate', function (degrees) {\n return this.hue((degrees || 0) / 360, true);\n });\n};\n","module.exports = function saturate(color) {\n color.use(require('../HSL'));\n\n color.installMethod('saturate', function (amount) {\n return this.saturation(isNaN(amount) ? 0.1 : amount, true);\n });\n};\n","// Adapted from http://gimp.sourcearchive.com/documentation/2.6.6-1ubuntu1/color-to-alpha_8c-source.html\n// toAlpha returns a color where the values of the argument have been converted to alpha\nmodule.exports = function toAlpha(color) {\n color.installMethod('toAlpha', function (color) {\n var me = this.rgb();\n var other = color(color).rgb();\n var epsilon = 1e-10;\n var a = new color.RGB(0, 0, 0, me._alpha);\n var channels = ['_red', '_green', '_blue'];\n\n channels.forEach(function (channel) {\n if (me[channel] < epsilon) {\n a[channel] = me[channel];\n } else if (me[channel] > other[channel]) {\n a[channel] = (me[channel] - other[channel]) / (1 - other[channel]);\n } else if (me[channel] > other[channel]) {\n a[channel] = (other[channel] - me[channel]) / other[channel];\n } else {\n a[channel] = 0;\n }\n });\n\n if (a._red > a._green) {\n if (a._red > a._blue) {\n me._alpha = a._red;\n } else {\n me._alpha = a._blue;\n }\n } else if (a._green > a._blue) {\n me._alpha = a._green;\n } else {\n me._alpha = a._blue;\n }\n\n if (me._alpha < epsilon) {\n return me;\n }\n\n channels.forEach(function (channel) {\n me[channel] = (me[channel] - other[channel]) / me._alpha + other[channel];\n });\n me._alpha *= a._alpha;\n\n return me;\n });\n};\n"],"names":["installedColorSpaces","undef","obj","channelRegExp","percentageChannelRegExp","cssColorRegExp","RegExp","source","divisor","unit","channelNumber","hasHue","color","Array","isArray","slice","length","RGB","lowerCased","toLowerCase","namedColors","matchCssSyntax","match","colorSpaceName","toUpperCase","Error","alpha","undefined","parseFloat","replace","hexMatch","parseInt","CMYK","cmykMatch","isColor","installColorSpace","propertyNames","config","a1","args","arguments","forEach","propertyName","i","propertyValue","this","_alpha","isNaN","join","_hue","Math","floor","prototype","methodName","hex","rgb","equals","otherColor","epsilon","abs","toJSON","concat","map","Object","hasOwnProperty","call","matchFromColorSpace","installForeignMethods","targetColorSpaceName","sourceColorSpaceName","prop","shortName","charAt","value","isDelta","toString","constructor","otherPropertyName","otherColorSpaceName","push","pluginList","use","plugin","indexOf","installMethod","name","fn","colorSpace","hexString","round","_red","_green","_blue","substr","hexa","alphaString","css","cssa","fromRgb","convert","channel","pow","r","g","b","XYZ","x","_x","y","_y","z","_z","lab","LAB","red","green","blue","hue","saturation","_saturation","_value","min","f","p","q","t","hsl","l","sv","svDivisor","HSL","max","delta","HSV","require$$0","hsv","_lightness","s","channelLuminance","require$$1","xyz","_l","_a","_b","require$$3","require$$4","_cyan","_black","_magenta","_yellow","cyan","magenta","yellow","black","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellowgreen","amount","color2","lum1","luminance","lum2","lightness","gs","val","require$$12","isDark","require$$15","weight","w","a","weight1","weight2","degrees","me","other","channels"],"mappings":"kNAAA,IAAIA,EAAuB,GACvBC,EAAQ,SAAUC,GACpB,YAAsB,IAARA,GAEZC,EAAgB,sCAChBC,EAA0B,qCAC1BC,EAAiB,IAAIC,OACvB,sBAEEH,EAAcI,OACd,OACAJ,EAAcI,OACd,OACAJ,EAAcI,OACd,UACAJ,EAAcI,OARhB,SAWA,KAGF,SAASC,EAAQC,EAAMC,EAAeC,GACpC,MAAa,MAATF,EACK,IACW,QAATA,GAAmBE,GAA4B,IAAlBD,EAC/B,IACGD,OAAL,EACE,IAIX,SAASG,EAAMV,GACb,GAAIW,MAAMC,QAAQZ,GAAM,CACtB,GAAsB,iBAAXA,EAAI,IAA4C,mBAAlBU,EAAMV,EAAI,IAEjD,OAAO,IAAIU,EAAMV,EAAI,IAAIA,EAAIa,MAAM,EAAGb,EAAIc,SACrC,GAAmB,IAAfd,EAAIc,OAEb,OAAO,IAAIJ,EAAMK,IACff,EAAI,GAAK,IACTA,EAAI,GAAK,IACTA,EAAI,GAAK,IACTA,EAAI,GAAK,UAGR,GAAmB,iBAARA,EAAkB,CAClC,IAAIgB,EAAahB,EAAIiB,cACjBP,EAAMQ,YAAYF,KACpBhB,EAAM,IAAMU,EAAMQ,YAAYF,IAEb,gBAAfA,IACFhB,EAAM,iBAGR,IAAImB,EAAiBnB,EAAIoB,MAAMjB,GAC/B,GAAIgB,EAAgB,CAClB,IAAIE,EAAiBF,EAAe,GAAGG,cACnCb,EAA+B,MAAtBY,EAAe,GAC5B,GAAItB,EAAMW,EAAMW,IACd,MAAM,IAAIE,MAAM,SAAWF,EAAiB,sBAG9C,IAAIG,EAAQzB,EAAMoB,EAAe,IAAM,OAAIM,EAQ3C,YAPcA,IAAVD,IAEAA,EADwB,MAAtBL,EAAe,GACTO,WAAWP,EAAe,IAAM,IAEhCO,WAAWP,EAAe,KAG/B,IAAI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