mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-13 05:13:33 -06:00
Initial commit
This commit is contained in:
24
node_modules/onecolor/LICENSE
generated
vendored
Normal file
24
node_modules/onecolor/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Copyright (c) 2011, One.com
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Neither the name of the author nor the names of contributors may
|
||||
be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
20
node_modules/onecolor/index.js
generated
vendored
Normal file
20
node_modules/onecolor/index.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
module.exports = require('./lib/color')
|
||||
.use(require('./lib/XYZ'))
|
||||
.use(require('./lib/LAB'))
|
||||
.use(require('./lib/HSV'))
|
||||
.use(require('./lib/HSL'))
|
||||
.use(require('./lib/CMYK'))
|
||||
|
||||
// Convenience functions
|
||||
.use(require('./lib/plugins/namedColors'))
|
||||
.use(require('./lib/plugins/clearer.js'))
|
||||
.use(require('./lib/plugins/darken.js'))
|
||||
.use(require('./lib/plugins/desaturate.js'))
|
||||
.use(require('./lib/plugins/grayscale.js'))
|
||||
.use(require('./lib/plugins/lighten.js'))
|
||||
.use(require('./lib/plugins/mix.js'))
|
||||
.use(require('./lib/plugins/negate.js'))
|
||||
.use(require('./lib/plugins/opaquer.js'))
|
||||
.use(require('./lib/plugins/rotate.js'))
|
||||
.use(require('./lib/plugins/saturate.js'))
|
||||
.use(require('./lib/plugins/toAlpha.js'));
|
30
node_modules/onecolor/lib/CMYK.js
generated
vendored
Normal file
30
node_modules/onecolor/lib/CMYK.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
module.exports = function CMYK(color) {
|
||||
color.installColorSpace('CMYK', ['cyan', 'magenta', 'yellow', 'black', 'alpha'], {
|
||||
rgb: function () {
|
||||
return new color.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 () { // Becomes one.color.RGB.prototype.cmyk
|
||||
// Adapted from http://www.javascripter.net/faq/rgb2cmyk.htm
|
||||
var red = this._red,
|
||||
green = this._green,
|
||||
blue = this._blue,
|
||||
cyan = 1 - red,
|
||||
magenta = 1 - green,
|
||||
yellow = 1 - blue,
|
||||
black = 1;
|
||||
if (red || green || blue) {
|
||||
black = Math.min(cyan, Math.min(magenta, yellow));
|
||||
cyan = (cyan - black) / (1 - black);
|
||||
magenta = (magenta - black) / (1 - black);
|
||||
yellow = (yellow - black) / (1 - black);
|
||||
} else {
|
||||
black = 1;
|
||||
}
|
||||
return new color.CMYK(cyan, magenta, yellow, black, this._alpha);
|
||||
}
|
||||
});
|
||||
};
|
29
node_modules/onecolor/lib/HSL.js
generated
vendored
Normal file
29
node_modules/onecolor/lib/HSL.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
module.exports = function HSL(color) {
|
||||
color.use(require('./HSV'));
|
||||
|
||||
color.installColorSpace('HSL', ['hue', 'saturation', 'lightness', 'alpha'], {
|
||||
hsv: function () {
|
||||
// Algorithm adapted from http://wiki.secondlife.com/wiki/Color_conversion_scripts
|
||||
var l = this._lightness * 2,
|
||||
s = this._saturation * ((l <= 1) ? l : 2 - l),
|
||||
saturation;
|
||||
|
||||
// Avoid division by zero when l + s is very small (approaching black):
|
||||
if (l + s < 1e-9) {
|
||||
saturation = 0;
|
||||
} else {
|
||||
saturation = (2 * s) / (l + s);
|
||||
}
|
||||
|
||||
return new color.HSV(this._hue, saturation, (l + s) / 2, this._alpha);
|
||||
},
|
||||
|
||||
rgb: function () {
|
||||
return this.hsv().rgb();
|
||||
},
|
||||
|
||||
fromRgb: function () { // Becomes one.color.RGB.prototype.hsv
|
||||
return this.hsv().hsl();
|
||||
}
|
||||
});
|
||||
};
|
93
node_modules/onecolor/lib/HSV.js
generated
vendored
Normal file
93
node_modules/onecolor/lib/HSV.js
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
module.exports = function HSV(color) {
|
||||
color.installColorSpace('HSV', ['hue', 'saturation', 'value', 'alpha'], {
|
||||
rgb: function () {
|
||||
var hue = this._hue,
|
||||
saturation = this._saturation,
|
||||
value = this._value,
|
||||
i = Math.min(5, Math.floor(hue * 6)),
|
||||
f = hue * 6 - i,
|
||||
p = value * (1 - saturation),
|
||||
q = value * (1 - f * saturation),
|
||||
t = value * (1 - (1 - f) * saturation),
|
||||
red,
|
||||
green,
|
||||
blue;
|
||||
switch (i) {
|
||||
case 0:
|
||||
red = value;
|
||||
green = t;
|
||||
blue = p;
|
||||
break;
|
||||
case 1:
|
||||
red = q;
|
||||
green = value;
|
||||
blue = p;
|
||||
break;
|
||||
case 2:
|
||||
red = p;
|
||||
green = value;
|
||||
blue = t;
|
||||
break;
|
||||
case 3:
|
||||
red = p;
|
||||
green = q;
|
||||
blue = value;
|
||||
break;
|
||||
case 4:
|
||||
red = t;
|
||||
green = p;
|
||||
blue = value;
|
||||
break;
|
||||
case 5:
|
||||
red = value;
|
||||
green = p;
|
||||
blue = q;
|
||||
break;
|
||||
}
|
||||
return new color.RGB(red, green, blue, this._alpha);
|
||||
},
|
||||
|
||||
hsl: function () {
|
||||
var l = (2 - this._saturation) * this._value,
|
||||
sv = this._saturation * this._value,
|
||||
svDivisor = l <= 1 ? l : (2 - l),
|
||||
saturation;
|
||||
|
||||
// Avoid division by zero when lightness approaches zero:
|
||||
if (svDivisor < 1e-9) {
|
||||
saturation = 0;
|
||||
} else {
|
||||
saturation = sv / svDivisor;
|
||||
}
|
||||
return new color.HSL(this._hue, saturation, l / 2, this._alpha);
|
||||
},
|
||||
|
||||
fromRgb: function () { // Becomes one.color.RGB.prototype.hsv
|
||||
var red = this._red,
|
||||
green = this._green,
|
||||
blue = this._blue,
|
||||
max = Math.max(red, green, blue),
|
||||
min = Math.min(red, green, blue),
|
||||
delta = max - min,
|
||||
hue,
|
||||
saturation = (max === 0) ? 0 : (delta / max),
|
||||
value = max;
|
||||
if (delta === 0) {
|
||||
hue = 0;
|
||||
} else {
|
||||
switch (max) {
|
||||
case red:
|
||||
hue = (green - blue) / delta / 6 + (green < blue ? 1 : 0);
|
||||
break;
|
||||
case green:
|
||||
hue = (blue - red) / delta / 6 + 1 / 3;
|
||||
break;
|
||||
case blue:
|
||||
hue = (red - green) / delta / 6 + 2 / 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new color.HSV(hue, saturation, value, this._alpha);
|
||||
}
|
||||
});
|
||||
};
|
33
node_modules/onecolor/lib/LAB.js
generated
vendored
Normal file
33
node_modules/onecolor/lib/LAB.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
module.exports = function LAB(color) {
|
||||
color.use(require('./XYZ.js'));
|
||||
|
||||
color.installColorSpace('LAB', ['l', 'a', 'b', 'alpha'], {
|
||||
fromRgb: function () {
|
||||
return this.xyz().lab();
|
||||
},
|
||||
|
||||
rgb: function () {
|
||||
return this.xyz().rgb();
|
||||
},
|
||||
|
||||
xyz: function () {
|
||||
// http://www.easyrgb.com/index.php?X=MATH&H=08#text8
|
||||
var convert = function (channel) {
|
||||
var pow = Math.pow(channel, 3);
|
||||
return pow > 0.008856 ?
|
||||
pow :
|
||||
(channel - 16 / 116) / 7.87;
|
||||
},
|
||||
y = (this._l + 16) / 116,
|
||||
x = this._a / 500 + y,
|
||||
z = y - this._b / 200;
|
||||
|
||||
return new color.XYZ(
|
||||
convert(x) * 95.047,
|
||||
convert(y) * 100.000,
|
||||
convert(z) * 108.883,
|
||||
this._alpha
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
64
node_modules/onecolor/lib/XYZ.js
generated
vendored
Normal file
64
node_modules/onecolor/lib/XYZ.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
module.exports = function XYZ(color) {
|
||||
color.installColorSpace('XYZ', ['x', 'y', 'z', 'alpha'], {
|
||||
fromRgb: function () {
|
||||
// http://www.easyrgb.com/index.php?X=MATH&H=02#text2
|
||||
var convert = function (channel) {
|
||||
return channel > 0.04045 ?
|
||||
Math.pow((channel + 0.055) / 1.055, 2.4) :
|
||||
channel / 12.92;
|
||||
},
|
||||
r = convert(this._red),
|
||||
g = convert(this._green),
|
||||
b = convert(this._blue);
|
||||
|
||||
// Reference white point sRGB D65:
|
||||
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
|
||||
return new color.XYZ(
|
||||
r * 0.4124564 + g * 0.3575761 + b * 0.1804375,
|
||||
r * 0.2126729 + g * 0.7151522 + b * 0.0721750,
|
||||
r * 0.0193339 + g * 0.1191920 + b * 0.9503041,
|
||||
this._alpha
|
||||
);
|
||||
},
|
||||
|
||||
rgb: function () {
|
||||
// http://www.easyrgb.com/index.php?X=MATH&H=01#text1
|
||||
var x = this._x,
|
||||
y = this._y,
|
||||
z = this._z,
|
||||
convert = function (channel) {
|
||||
return channel > 0.0031308 ?
|
||||
1.055 * Math.pow(channel, 1 / 2.4) - 0.055 :
|
||||
12.92 * channel;
|
||||
};
|
||||
|
||||
// Reference white point sRGB D65:
|
||||
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
|
||||
return new color.RGB(
|
||||
convert(x * 3.2404542 + y * -1.5371385 + z * -0.4985314),
|
||||
convert(x * -0.9692660 + y * 1.8760108 + z * 0.0415560),
|
||||
convert(x * 0.0556434 + y * -0.2040259 + z * 1.0572252),
|
||||
this._alpha
|
||||
);
|
||||
},
|
||||
|
||||
lab: function () {
|
||||
// http://www.easyrgb.com/index.php?X=MATH&H=07#text7
|
||||
var convert = function (channel) {
|
||||
return channel > 0.008856 ?
|
||||
Math.pow(channel, 1 / 3) :
|
||||
7.787037 * channel + 4 / 29;
|
||||
},
|
||||
x = convert(this._x / 95.047),
|
||||
y = convert(this._y / 100.000),
|
||||
z = convert(this._z / 108.883);
|
||||
|
||||
return new color.LAB(
|
||||
(116 * y) - 16,
|
||||
500 * (x - y),
|
||||
200 * (y - z),
|
||||
this._alpha
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
254
node_modules/onecolor/lib/color.js
generated
vendored
Normal file
254
node_modules/onecolor/lib/color.js
generated
vendored
Normal file
@@ -0,0 +1,254 @@
|
||||
var installedColorSpaces = [],
|
||||
undef = function (obj) {
|
||||
return typeof obj === 'undefined';
|
||||
},
|
||||
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');
|
||||
|
||||
function color(obj) {
|
||||
if (Array.isArray(obj)) {
|
||||
if (typeof obj[0] === 'string' && typeof color[obj[0]] === 'function') {
|
||||
// Assumed array from .toJSON()
|
||||
return new color[obj[0]](obj.slice(1, obj.length));
|
||||
} else if (obj.length === 4) {
|
||||
// Assumed 4 element int RGB array from canvas with all channels [0;255]
|
||||
return new color.RGB(obj[0] / 255, obj[1] / 255, obj[2] / 255, obj[3] / 255);
|
||||
}
|
||||
} else if (typeof obj === 'string') {
|
||||
var lowerCased = obj.toLowerCase();
|
||||
if (color.namedColors[lowerCased]) {
|
||||
obj = '#' + color.namedColors[lowerCased];
|
||||
}
|
||||
if (lowerCased === 'transparent') {
|
||||
obj = 'rgba(0,0,0,0)';
|
||||
}
|
||||
// Test for CSS rgb(....) string
|
||||
var matchCssSyntax = obj.match(cssColorRegExp);
|
||||
if (matchCssSyntax) {
|
||||
var colorSpaceName = matchCssSyntax[1].toUpperCase(),
|
||||
alpha = undef(matchCssSyntax[8]) ? matchCssSyntax[8] : parseFloat(matchCssSyntax[8]),
|
||||
hasHue = colorSpaceName[0] === 'H',
|
||||
firstChannelDivisor = matchCssSyntax[3] ? 100 : (hasHue ? 360 : 255),
|
||||
secondChannelDivisor = (matchCssSyntax[5] || hasHue) ? 100 : 255,
|
||||
thirdChannelDivisor = (matchCssSyntax[7] || hasHue) ? 100 : 255;
|
||||
if (undef(color[colorSpaceName])) {
|
||||
throw new Error('color.' + colorSpaceName + ' is not installed.');
|
||||
}
|
||||
return new color[colorSpaceName](
|
||||
parseFloat(matchCssSyntax[2]) / firstChannelDivisor,
|
||||
parseFloat(matchCssSyntax[4]) / secondChannelDivisor,
|
||||
parseFloat(matchCssSyntax[6]) / thirdChannelDivisor,
|
||||
alpha
|
||||
);
|
||||
}
|
||||
// Assume hex syntax
|
||||
if (obj.length < 6) {
|
||||
// Allow CSS shorthand
|
||||
obj = obj.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i, '$1$1$2$2$3$3');
|
||||
}
|
||||
// Split obj into red, green, and blue components
|
||||
var hexMatch = obj.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);
|
||||
if (hexMatch) {
|
||||
return new color.RGB(
|
||||
parseInt(hexMatch[1], 16) / 255,
|
||||
parseInt(hexMatch[2], 16) / 255,
|
||||
parseInt(hexMatch[3], 16) / 255
|
||||
);
|
||||
}
|
||||
|
||||
// No match so far. Lets try the less likely ones
|
||||
if (color.CMYK) {
|
||||
var cmykMatch = obj.match(new RegExp(
|
||||
'^cmyk' +
|
||||
'\\(' +
|
||||
percentageChannelRegExp.source + ',' +
|
||||
percentageChannelRegExp.source + ',' +
|
||||
percentageChannelRegExp.source + ',' +
|
||||
percentageChannelRegExp.source +
|
||||
'\\)$', 'i'));
|
||||
if (cmykMatch) {
|
||||
return new color.CMYK(
|
||||
parseFloat(cmykMatch[1]) / 100,
|
||||
parseFloat(cmykMatch[2]) / 100,
|
||||
parseFloat(cmykMatch[3]) / 100,
|
||||
parseFloat(cmykMatch[4]) / 100
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if (typeof obj === 'object' && obj.isColor) {
|
||||
return obj;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
color.namedColors = {};
|
||||
|
||||
color.installColorSpace = function (colorSpaceName, propertyNames, config) {
|
||||
color[colorSpaceName] = function (a1) { // ...
|
||||
var args = Array.isArray(a1) ? a1 : arguments;
|
||||
propertyNames.forEach(function (propertyName, i) {
|
||||
var propertyValue = args[i];
|
||||
if (propertyName === 'alpha') {
|
||||
this._alpha = (isNaN(propertyValue) || propertyValue > 1) ? 1 : (propertyValue < 0 ? 0 : propertyValue);
|
||||
} else {
|
||||
if (isNaN(propertyValue)) {
|
||||
throw new Error('[' + colorSpaceName + ']: Invalid color: (' + propertyNames.join(',') + ')');
|
||||
}
|
||||
if (propertyName === 'hue') {
|
||||
this._hue = propertyValue < 0 ? propertyValue - Math.floor(propertyValue) : propertyValue % 1;
|
||||
} else {
|
||||
this['_' + propertyName] = propertyValue < 0 ? 0 : (propertyValue > 1 ? 1 : propertyValue);
|
||||
}
|
||||
}
|
||||
}, this);
|
||||
};
|
||||
color[colorSpaceName].propertyNames = propertyNames;
|
||||
|
||||
var prototype = color[colorSpaceName].prototype;
|
||||
|
||||
['valueOf', 'hex', 'hexa', 'css', 'cssa'].forEach(function (methodName) {
|
||||
prototype[methodName] = prototype[methodName] || (colorSpaceName === 'RGB' ? prototype.hex : function () {
|
||||
return this.rgb()[methodName]();
|
||||
});
|
||||
});
|
||||
|
||||
prototype.isColor = true;
|
||||
|
||||
prototype.equals = function (otherColor, epsilon) {
|
||||
if (undef(epsilon)) {
|
||||
epsilon = 1e-10;
|
||||
}
|
||||
|
||||
otherColor = otherColor[colorSpaceName.toLowerCase()]();
|
||||
|
||||
for (var i = 0; i < propertyNames.length; i = i + 1) {
|
||||
if (Math.abs(this['_' + propertyNames[i]] - otherColor['_' + propertyNames[i]]) > epsilon) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
prototype.toJSON = function () {
|
||||
return [colorSpaceName].concat(propertyNames.map(function (propertyName) {
|
||||
return this['_' + propertyName];
|
||||
}, this));
|
||||
};
|
||||
|
||||
for (var propertyName in config) {
|
||||
if (config.hasOwnProperty(propertyName)) {
|
||||
var matchFromColorSpace = propertyName.match(/^from(.*)$/);
|
||||
if (matchFromColorSpace) {
|
||||
color[matchFromColorSpace[1].toUpperCase()].prototype[colorSpaceName.toLowerCase()] = config[propertyName];
|
||||
} else {
|
||||
prototype[propertyName] = config[propertyName];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// It is pretty easy to implement the conversion to the same color space:
|
||||
prototype[colorSpaceName.toLowerCase()] = function () {
|
||||
return this;
|
||||
};
|
||||
prototype.toString = function () {
|
||||
return '[' + colorSpaceName + ' ' + propertyNames.map(function (propertyName) {
|
||||
return this['_' + propertyName];
|
||||
}).join(', ') + ']';
|
||||
};
|
||||
|
||||
// Generate getters and setters
|
||||
propertyNames.forEach(function (propertyName) {
|
||||
var shortName = propertyName === 'black' ? 'k' : propertyName.charAt(0);
|
||||
prototype[propertyName] = prototype[shortName] = function (value, isDelta) {
|
||||
// Simple getter mode: color.red()
|
||||
if (typeof value === 'undefined') {
|
||||
return this['_' + propertyName];
|
||||
} else if (isDelta) {
|
||||
// Adjuster: color.red(+.2, true)
|
||||
return new this.constructor(propertyNames.map(function (otherPropertyName) {
|
||||
return this['_' + otherPropertyName] + (propertyName === otherPropertyName ? value : 0);
|
||||
}, this));
|
||||
} else {
|
||||
// Setter: color.red(.2);
|
||||
return new this.constructor(propertyNames.map(function (otherPropertyName) {
|
||||
return (propertyName === otherPropertyName) ? value : this['_' + otherPropertyName];
|
||||
}, this));
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
function installForeignMethods(targetColorSpaceName, sourceColorSpaceName) {
|
||||
var obj = {};
|
||||
obj[sourceColorSpaceName.toLowerCase()] = function () {
|
||||
return this.rgb()[sourceColorSpaceName.toLowerCase()]();
|
||||
};
|
||||
color[sourceColorSpaceName].propertyNames.forEach(function (propertyName) {
|
||||
var shortName = propertyName === 'black' ? 'k' : propertyName.charAt(0);
|
||||
obj[propertyName] = obj[shortName] = function (value, isDelta) {
|
||||
return this[sourceColorSpaceName.toLowerCase()]()[propertyName](value, isDelta);
|
||||
};
|
||||
});
|
||||
for (var prop in obj) {
|
||||
if (obj.hasOwnProperty(prop) && color[targetColorSpaceName].prototype[prop] === undefined) {
|
||||
color[targetColorSpaceName].prototype[prop] = obj[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
installedColorSpaces.forEach(function (otherColorSpaceName) {
|
||||
installForeignMethods(colorSpaceName, otherColorSpaceName);
|
||||
installForeignMethods(otherColorSpaceName, colorSpaceName);
|
||||
});
|
||||
|
||||
installedColorSpaces.push(colorSpaceName);
|
||||
return color;
|
||||
};
|
||||
|
||||
color.pluginList = [];
|
||||
|
||||
color.use = function (plugin) {
|
||||
if (color.pluginList.indexOf(plugin) === -1) {
|
||||
this.pluginList.push(plugin);
|
||||
plugin(color);
|
||||
}
|
||||
return color;
|
||||
};
|
||||
|
||||
color.installMethod = function (name, fn) {
|
||||
installedColorSpaces.forEach(function (colorSpace) {
|
||||
color[colorSpace].prototype[name] = fn;
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
color.installColorSpace('RGB', ['red', 'green', 'blue', 'alpha'], {
|
||||
hex: function () {
|
||||
var hexString = (Math.round(255 * this._red) * 0x10000 + Math.round(255 * this._green) * 0x100 + Math.round(255 * this._blue)).toString(16);
|
||||
return '#' + ('00000'.substr(0, 6 - hexString.length)) + hexString;
|
||||
},
|
||||
|
||||
hexa: function () {
|
||||
var alphaString = Math.round(this._alpha * 255).toString(16);
|
||||
return '#' + '00'.substr(0, 2 - alphaString.length) + alphaString + 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;
|
5
node_modules/onecolor/lib/plugins/clearer.js
generated
vendored
Normal file
5
node_modules/onecolor/lib/plugins/clearer.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = function clearer(color) {
|
||||
color.installMethod('clearer', function (amount) {
|
||||
return this.alpha(isNaN(amount) ? -0.1 : -amount, true);
|
||||
});
|
||||
};
|
7
node_modules/onecolor/lib/plugins/darken.js
generated
vendored
Normal file
7
node_modules/onecolor/lib/plugins/darken.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function darken(color) {
|
||||
color.use(require('../HSL'));
|
||||
|
||||
color.installMethod('darken', function (amount) {
|
||||
return this.lightness(isNaN(amount) ? -0.1 : -amount, true);
|
||||
});
|
||||
};
|
7
node_modules/onecolor/lib/plugins/desaturate.js
generated
vendored
Normal file
7
node_modules/onecolor/lib/plugins/desaturate.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function desaturate(color) {
|
||||
color.use(require('../HSL'));
|
||||
|
||||
color.installMethod('desaturate', function (amount) {
|
||||
return this.saturation(isNaN(amount) ? -0.1 : -amount, true);
|
||||
});
|
||||
};
|
11
node_modules/onecolor/lib/plugins/grayscale.js
generated
vendored
Normal file
11
node_modules/onecolor/lib/plugins/grayscale.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = function grayscale(color) {
|
||||
function gs () {
|
||||
/*jslint strict:false*/
|
||||
var rgb = this.rgb(),
|
||||
val = rgb._red * 0.3 + rgb._green * 0.59 + rgb._blue * 0.11;
|
||||
|
||||
return new color.RGB(val, val, val, rgb._alpha);
|
||||
}
|
||||
|
||||
color.installMethod('greyscale', gs).installMethod('grayscale', gs);
|
||||
};
|
7
node_modules/onecolor/lib/plugins/lighten.js
generated
vendored
Normal file
7
node_modules/onecolor/lib/plugins/lighten.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function lighten(color) {
|
||||
color.use(require('../HSL'));
|
||||
|
||||
color.installMethod('lighten', function (amount) {
|
||||
return this.lightness(isNaN(amount) ? 0.1 : amount, true);
|
||||
});
|
||||
};
|
19
node_modules/onecolor/lib/plugins/mix.js
generated
vendored
Normal file
19
node_modules/onecolor/lib/plugins/mix.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
module.exports = function mix(color) {
|
||||
color.installMethod('mix', function (otherColor, weight) {
|
||||
otherColor = color(otherColor).rgb();
|
||||
weight = 1 - (isNaN(weight) ? 0.5 : weight);
|
||||
|
||||
var w = weight * 2 - 1,
|
||||
a = this._alpha - otherColor._alpha,
|
||||
weight1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2,
|
||||
weight2 = 1 - weight1,
|
||||
rgb = this.rgb();
|
||||
|
||||
return new color.RGB(
|
||||
rgb._red * weight1 + otherColor._red * weight2,
|
||||
rgb._green * weight1 + otherColor._green * weight2,
|
||||
rgb._blue * weight1 + otherColor._blue * weight2,
|
||||
rgb._alpha * weight + otherColor._alpha * (1 - weight)
|
||||
);
|
||||
});
|
||||
};
|
152
node_modules/onecolor/lib/plugins/namedColors.js
generated
vendored
Normal file
152
node_modules/onecolor/lib/plugins/namedColors.js
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
module.exports = function namedColors(color) {
|
||||
color.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'
|
||||
};
|
||||
};
|
6
node_modules/onecolor/lib/plugins/negate.js
generated
vendored
Normal file
6
node_modules/onecolor/lib/plugins/negate.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = function negate(color) {
|
||||
color.installMethod('negate', function () {
|
||||
var rgb = this.rgb();
|
||||
return new color.RGB(1 - rgb._red, 1 - rgb._green, 1 - rgb._blue, this._alpha);
|
||||
});
|
||||
};
|
5
node_modules/onecolor/lib/plugins/opaquer.js
generated
vendored
Normal file
5
node_modules/onecolor/lib/plugins/opaquer.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
module.exports = function opaquer(color) {
|
||||
color.installMethod('opaquer', function (amount) {
|
||||
return this.alpha(isNaN(amount) ? 0.1 : amount, true);
|
||||
});
|
||||
};
|
7
node_modules/onecolor/lib/plugins/rotate.js
generated
vendored
Normal file
7
node_modules/onecolor/lib/plugins/rotate.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function rotate(color) {
|
||||
color.use(require('../HSL'));
|
||||
|
||||
color.installMethod('rotate', function (degrees) {
|
||||
return this.hue((degrees || 0) / 360, true);
|
||||
});
|
||||
};
|
7
node_modules/onecolor/lib/plugins/saturate.js
generated
vendored
Normal file
7
node_modules/onecolor/lib/plugins/saturate.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports = function saturate(color) {
|
||||
color.use(require('../HSL'));
|
||||
|
||||
color.installMethod('saturate', function (amount) {
|
||||
return this.saturation(isNaN(amount) ? 0.1 : amount, true);
|
||||
});
|
||||
};
|
46
node_modules/onecolor/lib/plugins/toAlpha.js
generated
vendored
Normal file
46
node_modules/onecolor/lib/plugins/toAlpha.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
// Adapted from http://gimp.sourcearchive.com/documentation/2.6.6-1ubuntu1/color-to-alpha_8c-source.html
|
||||
// toAlpha returns a color where the values of the argument have been converted to alpha
|
||||
module.exports = function toAlpha(color) {
|
||||
color.installMethod('toAlpha', function (color) {
|
||||
var me = this.rgb(),
|
||||
other = color(color).rgb(),
|
||||
epsilon = 1e-10,
|
||||
a = new color.RGB(0, 0, 0, me._alpha),
|
||||
channels = ['_red', '_green', '_blue'];
|
||||
|
||||
channels.forEach(function (channel) {
|
||||
if (me[channel] < epsilon) {
|
||||
a[channel] = me[channel];
|
||||
} else if (me[channel] > other[channel]) {
|
||||
a[channel] = (me[channel] - other[channel]) / (1 - other[channel]);
|
||||
} else if (me[channel] > other[channel]) {
|
||||
a[channel] = (other[channel] - me[channel]) / other[channel];
|
||||
} else {
|
||||
a[channel] = 0;
|
||||
}
|
||||
});
|
||||
|
||||
if (a._red > a._green) {
|
||||
if (a._red > a._blue) {
|
||||
me._alpha = a._red;
|
||||
} else {
|
||||
me._alpha = a._blue;
|
||||
}
|
||||
} else if (a._green > a._blue) {
|
||||
me._alpha = a._green;
|
||||
} else {
|
||||
me._alpha = a._blue;
|
||||
}
|
||||
|
||||
if (me._alpha < epsilon) {
|
||||
return me;
|
||||
}
|
||||
|
||||
channels.forEach(function (channel) {
|
||||
me[channel] = (me[channel] - other[channel]) / me._alpha + other[channel];
|
||||
});
|
||||
me._alpha *= a._alpha;
|
||||
|
||||
return me;
|
||||
});
|
||||
};
|
3
node_modules/onecolor/minimal.js
generated
vendored
Normal file
3
node_modules/onecolor/minimal.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = require('./lib/color')
|
||||
.use(require('./lib/HSV'))
|
||||
.use(require('./lib/HSL'));
|
43
node_modules/onecolor/one-color-all.js
generated
vendored
Normal file
43
node_modules/onecolor/one-color-all.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
(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 n=this._x,r=this._y,i=this._z,h=function(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t};return new t.RGB(h(3.2404542*n+-1.5371385*r+i*-.4985314),h(n*-.969266+1.8760108*r+.041556*i),h(.0556434*n+r*-.2040259+1.0572252*i),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]:t?new this.constructor(o.map(function(o){return this["_"+o]+(r===o?e:0)},this)):new this.constructor(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.pluginList=[],color.use=function(r){return-1===color.pluginList.indexOf(r)&&(this.pluginList.push(r),r(color)),color},color.installMethod=function(r,o){return installedColorSpaces.forEach(function(e){color[e].prototype[r]=o}),this},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 l(){var l=this.rgb(),n=.3*l._red+.59*l._green+.11*l._blue;return new e.RGB(n,n,n,l._alpha)}e.installMethod("greyscale",l).installMethod("grayscale",l)};
|
||||
},{}],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(e){e.installMethod("mix",function(a,r){a=e(a).rgb(),r=1-(isNaN(r)?.5:r);var _=2*r-1,l=this._alpha-a._alpha,n=((_*l===-1?_:(_+l)/(1+_*l))+1)/2,t=1-n,h=this.rgb();return new e.RGB(h._red*n+a._red*t,h._green*n+a._green*t,h._blue*n+a._blue*t,h._alpha*r+a._alpha*(1-r))})};
|
||||
},{}],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(a){a.installMethod("toAlpha",function(a){var e=this.rgb(),_=a(a).rgb(),l=1e-10,r=new a.RGB(0,0,0,e._alpha),n=["_red","_green","_blue"];return n.forEach(function(a){e[a]<l?r[a]=e[a]:e[a]>_[a]?r[a]=(e[a]-_[a])/(1-_[a]):e[a]>_[a]?r[a]=(_[a]-e[a])/_[a]:r[a]=0}),r._red>r._green?r._red>r._blue?e._alpha=r._red:e._alpha=r._blue:r._green>r._blue?e._alpha=r._green:e._alpha=r._blue,e._alpha<l?e:(n.forEach(function(a){e[a]=(e[a]-_[a])/e._alpha+_[a]}),e._alpha*=r._alpha,e)})};
|
||||
},{}]},{},[1])(1)
|
||||
});
|
||||
|
||||
|
||||
//# sourceMappingURL=one-color-all.map
|
1
node_modules/onecolor/one-color-all.map
generated
vendored
Normal file
1
node_modules/onecolor/one-color-all.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
13
node_modules/onecolor/one-color.js
generated
vendored
Normal file
13
node_modules/onecolor/one-color.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
(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]:t?new this.constructor(o.map(function(o){return this["_"+o]+(r===o?e:0)},this)):new this.constructor(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.pluginList=[],color.use=function(r){return-1===color.pluginList.indexOf(r)&&(this.pluginList.push(r),r(color)),color},color.installMethod=function(r,o){return installedColorSpaces.forEach(function(e){color[e].prototype[r]=o}),this},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
|
1
node_modules/onecolor/one-color.map
generated
vendored
Normal file
1
node_modules/onecolor/one-color.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
119
node_modules/onecolor/package.json
generated
vendored
Normal file
119
node_modules/onecolor/package.json
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"onecolor@^3.0.4",
|
||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/pipetteur"
|
||||
]
|
||||
],
|
||||
"_from": "onecolor@>=3.0.4 <4.0.0",
|
||||
"_id": "onecolor@3.0.4",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/onecolor",
|
||||
"_nodeVersion": "6.2.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/onecolor-3.0.4.tgz_1464614241696_0.5164547513704747"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "andreas@one.com",
|
||||
"name": "papandreou"
|
||||
},
|
||||
"_npmVersion": "3.8.9",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "onecolor",
|
||||
"raw": "onecolor@^3.0.4",
|
||||
"rawSpec": "^3.0.4",
|
||||
"scope": null,
|
||||
"spec": ">=3.0.4 <4.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/pipetteur"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/onecolor/-/onecolor-3.0.4.tgz",
|
||||
"_shasum": "75a46f80da6c7aaa5b4daae17a47198bd9652494",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "onecolor@^3.0.4",
|
||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/pipetteur",
|
||||
"bugs": {
|
||||
"url": "https://github.com/One-com/one-color/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Javascript color object with implicit color space conversions. Supports RGB, HSV, HSL and CMYK with alpha channel.",
|
||||
"devDependencies": {
|
||||
"browserify": "13.0.0",
|
||||
"bundle-collapser": "1.2.1",
|
||||
"coveralls": "2.11.9",
|
||||
"istanbul": "0.4.2",
|
||||
"jshint": "^2.9.1",
|
||||
"minifyify": "7.3.2",
|
||||
"mocha": "2.4.5",
|
||||
"mocha-lcov-reporter": "1.2.0",
|
||||
"unexpected": "10.11.1"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "75a46f80da6c7aaa5b4daae17a47198bd9652494",
|
||||
"tarball": "https://registry.npmjs.org/onecolor/-/onecolor-3.0.4.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.4.8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib",
|
||||
"minimal.js",
|
||||
"one-color-all.js",
|
||||
"one-color-all.map",
|
||||
"one-color.js",
|
||||
"one-color.map"
|
||||
],
|
||||
"gitHead": "4a29ef5c57ff11064d4e15c0940929da11d34a43",
|
||||
"homepage": "https://github.com/One-com/one-color#readme",
|
||||
"jspm": {
|
||||
"dependencies": {},
|
||||
"jspmPackage": true,
|
||||
"main": "one-color-all.js"
|
||||
},
|
||||
"keywords": [
|
||||
"cmyk",
|
||||
"color",
|
||||
"colour",
|
||||
"conversion",
|
||||
"hsl",
|
||||
"hsv",
|
||||
"rgb"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "papandreou",
|
||||
"email": "andreas@one.com"
|
||||
},
|
||||
{
|
||||
"name": "munter",
|
||||
"email": "munter@fumle.dk"
|
||||
}
|
||||
],
|
||||
"name": "onecolor",
|
||||
"optionalDependencies": {},
|
||||
"publishConfig": {
|
||||
"registry": "http://registry.npmjs.org/"
|
||||
},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/One-com/one-color.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "browserify -p bundle-collapser/plugin -p [ minifyify --map one-color-all.map --output one-color-all.map ] --debug -e index -s one.color > one-color-all.js && browserify -p bundle-collapser/plugin -p [ minifyify --map one-color.map --output one-color.map ] --debug -e minimal -s one.color > one-color.js",
|
||||
"coverage": "istanbul cover _mocha -- --reporter dot",
|
||||
"lint": "jshint .",
|
||||
"preversion": "npm run lint && npm run build && npm test && bash -c 'git add one-color{-all,}.{js,map}'",
|
||||
"test": "npm run lint && mocha",
|
||||
"travis": "npm run lint && npm run build && npm run coverage"
|
||||
},
|
||||
"version": "3.0.4"
|
||||
}
|
Reference in New Issue
Block a user