initial commit
This commit is contained in:
37
node_modules/husl/README.md
generated
vendored
Normal file
37
node_modules/husl/README.md
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# DEPRECATED
|
||||
|
||||
Identical functionality is provided under a new name: HSLuv.
|
||||
|
||||
Package: https://www.npmjs.com/package/hsluv
|
||||
Documentation: https://github.com/hsluv/hsluv/tree/master/javascript
|
||||
|
||||
## Usage
|
||||
|
||||
**husl.toHex(hue, saturation, lightness)**
|
||||
|
||||
*hue* is a number between 0 and 360, *saturation* and *lightness* are
|
||||
numbers between 0 and 100. This function returns the resulting color as
|
||||
a hex string.
|
||||
|
||||
**husl.toRGB(hue, saturation, lightness)**
|
||||
|
||||
Like above, but returns an array of 3 numbers between 0 and 1, for the
|
||||
r, g, and b channel.
|
||||
|
||||
**husl.fromHex(hex)**
|
||||
|
||||
Takes a hex string and returns the HUSL color as array that contains
|
||||
the hue (0-360), saturation(0-100) and lightness(0-100) channel.
|
||||
_Note_: The result can have rounding errors. For example saturation can
|
||||
be 100.00000000000007
|
||||
|
||||
**husl.fromRGB(red, green, blue)**
|
||||
|
||||
Like above, but *red*, *green* and *blue* are passed as numbers between
|
||||
0 and 1.
|
||||
|
||||
Use **husl.p.toHex**, **husl.p.toRGB**, **husl.p.fromHex** and
|
||||
**husl.p.fromRGB** for the pastel variant (HUSLp). Note that HUSLp does
|
||||
not contain all the colors of RGB, so converting arbitrary RGB to it may
|
||||
generate invalid HUSLp colors.
|
||||
|
||||
9
node_modules/husl/dist/husl.min.js
generated
vendored
Normal file
9
node_modules/husl/dist/husl.min.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
(function(){function b(){}function h(){}function n(){}function k(){}function f(){}function e(a){return function(b,c,l){return a([b,c,l])}}f.j=function(a){a=a.charCodeAt(1);if(a==a)return a};f.substr=function(a,b,c){if(null==c)c=a.length;else if(0>c)if(0==b)c=a.length+c;else return"";return a.substr(b,c)};k.parseInt=function(a){var b=parseInt(a,10);0!=b||120!=f.j(a)&&88!=f.j(a)||(b=parseInt(a));return isNaN(b)?null:b};n.L=function(a){for(var b="";b="0123456789ABCDEF".charAt(a&15)+b,a>>>=4,0<a;);for(;2>
|
||||
b.length;)b="0"+b;return b};h.K=function(a){return Math.abs(a.v)/Math.sqrt(Math.pow(a.J,2)+1)};h.X=function(a,b){return b.v/(Math.sin(a)-b.J*Math.cos(a))};b.m=function(a){for(var d=[],c=Math.pow(a+16,3)/1560896,c=c>b.l?c:a/b.g,l=0;3>l;)for(var g=l++,p=b.b[g][0],f=b.b[g][1],g=b.b[g][2],e=0;2>e;){var h=e++,k=(632260*g-126452*f)*c+126452*h;d.push({J:(284517*p-94839*g)*c/k,v:((838422*g+769860*f+731718*p)*a*c-769860*h*a)/k})}return d};b.B=function(a){a=b.m(a);for(var d=1.7976931348623157E308,c=0;2>c;)d=
|
||||
Math.min(d,h.K(a[c++]));return d};b.A=function(a,d){for(var c=d/360*Math.PI*2,l=b.m(a),g=1.7976931348623157E308,f=0;f<l.length;){var e=l[f];++f;e=h.X(c,e);0<=e&&(g=Math.min(g,e))}return g};b.a=function(a,b){for(var c=0,d=0,f=a.length;d<f;)var e=d++,c=c+a[e]*b[e];return c};b.f=function(a){return.0031308>=a?12.92*a:1.055*Math.pow(a,.4166666666666667)-.055};b.i=function(a){return.04045<a?Math.pow((a+.055)/1.055,2.4):a/12.92};b.ba=function(a){return[b.f(b.a(b.b[0],a)),b.f(b.a(b.b[1],a)),b.f(b.a(b.b[2],
|
||||
a))]};b.$=function(a){a=[b.i(a[0]),b.i(a[1]),b.i(a[2])];return[b.a(b.h[0],a),b.a(b.h[1],a),b.a(b.h[2],a)]};b.ca=function(a){return a<=b.l?a/b.c*b.g:116*Math.pow(a/b.c,.3333333333333333)-16};b.T=function(a){return 8>=a?b.c*a/b.g:b.c*Math.pow((a+16)/116,3)};b.aa=function(a){var d=a[0],c=a[1];a=d+15*c+3*a[2];0!=a?(d=4*d/a,a=9*c/a):a=d=NaN;c=b.ca(c);return 0==c?[0,0,0]:[c,13*c*(d-b.C),13*c*(a-b.D)]};b.Z=function(a){var d=a[0];if(0==d)return[0,0,0];var c=a[1]/(13*d)+b.C;a=a[2]/(13*d)+b.D;d=b.T(d);c=0-
|
||||
9*d*c/((c-4)*a-c*a);return[c,d,(9*d-15*a*d-a*c)/(3*a)]};b.Y=function(a){var b=a[0],c=a[1],e=a[2];a=Math.sqrt(c*c+e*e);1E-8>a?c=0:(c=180*Math.atan2(e,c)/3.141592653589793,0>c&&(c=360+c));return[b,a,c]};b.W=function(a){var b=a[1],c=a[2]/360*2*Math.PI;return[a[0],Math.cos(c)*b,Math.sin(c)*b]};b.P=function(a){var d=a[0],c=a[1];a=a[2];return 99.9999999<a?[100,0,d]:1E-8>a?[0,0,d]:[a,b.A(a,d)/100*c,d]};b.U=function(a){var d=a[0],c=a[2];return 99.9999999<d?[c,0,100]:1E-8>d?[c,0,0]:[c,a[1]/b.A(d,c)*100,d]};
|
||||
b.S=function(a){var d=a[0],c=a[1];a=a[2];return 99.9999999<a?[100,0,d]:1E-8>a?[0,0,d]:[a,b.B(a)/100*c,d]};b.V=function(a){var d=a[0],c=a[2];return 99.9999999<d?[c,0,100]:1E-8>d?[c,0,0]:[c,a[1]/b.B(d)*100,d]};b.F=function(a){for(var b="#",c=0,e=a.length;c<e;)b+=n.L(Math.round(255*a[c++])).toLowerCase();return b};b.o=function(a){a=a.toUpperCase();return[k.parseInt("0x"+f.substr(a,1,2))/255,k.parseInt("0x"+f.substr(a,3,2))/255,k.parseInt("0x"+f.substr(a,5,2))/255]};b.w=function(a){return b.ba(b.Z(b.W(a)))};
|
||||
b.I=function(a){return b.Y(b.aa(b.$(a)))};b.s=function(a){return b.w(b.P(a))};b.G=function(a){return b.U(b.I(a))};b.u=function(a){return b.w(b.S(a))};b.H=function(a){return b.V(b.I(a))};b.O=function(a){return b.F(b.s(a))};b.R=function(a){return b.F(b.u(a))};b.M=function(a){return b.G(b.o(a))};b.N=function(a){return b.H(b.o(a))};b.b=[[3.240969941904521,-1.537383177570093,-.498610760293],[-.96924363628087,1.87596750150772,.041555057407175],[.055630079696993,-.20397695888897,1.056971514242878]];b.h=
|
||||
[[.41239079926595,.35758433938387,.18048078840183],[.21263900587151,.71516867876775,.072192315360733],[.019330818715591,.11919477979462,.95053215224966]];b.c=1;b.C=.19783000664283;b.D=.46831999493879;b.g=903.2962962;b.l=.0088564516;var m={fromRGB:e(b.G),fromHex:b.M,toRGB:e(b.s),toHex:e(b.O),p:{fromRGB:e(b.H),fromHex:b.N,toRGB:e(b.u),toHex:e(b.R)}};"undefined"!==typeof jQuery&&(jQuery.husl=m);"undefined"!==typeof module&&(module.exports=m);"undefined"!==typeof define&&define(m);"undefined"!==typeof window&&
|
||||
(window.HUSL=m)})();
|
||||
15
node_modules/husl/package.json
generated
vendored
Normal file
15
node_modules/husl/package.json
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "husl",
|
||||
"description": "Human-friendly HSL",
|
||||
"keywords": ["color", "color space", "CIE", "RGB", "HUSL", "HSL"],
|
||||
"version": "6.0.6",
|
||||
"author": "Alexei Boronine <alexei@boronine.com>",
|
||||
"license": "MIT",
|
||||
"main": "dist/husl.min.js",
|
||||
"files": ["dist/husl.min.js"],
|
||||
"repository": {
|
||||
"type" : "git",
|
||||
"url" : "http://github.com/hsluv/hsluv.git"
|
||||
},
|
||||
"homepage": "http://www.hsluv.org"
|
||||
}
|
||||
Reference in New Issue
Block a user