-
Notifications
You must be signed in to change notification settings - Fork 40
/
one-color.js.map
1 lines (1 loc) · 21.8 KB
/
one-color.js.map
1
{"version":3,"file":"one-color.js","sources":["lib/color.js","lib/HSV.js","minimal.js","lib/HSL.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 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 = require('./lib/color')\n .use(require('./lib/HSV'))\n .use(require('./lib/HSL'));\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"],"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","red","green","blue","hue","saturation","_saturation","_value","min","f","p","q","t","hsl","l","sv","svDivisor","HSL","fromRgb","max","delta","HSV","require$$1","require$$0","hsv","_lightness","s"],"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,K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