Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@txdfe/at-colors

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@txdfe/at-colors - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

4

lib/index.js
/*!
* at-colors v1.0.4
* at-colors v1.0.6
* Copyright 2020-present, Alibaba, Inc.
* All rights reserved.
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ATCOLOR=e():t.ATCOLOR=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(r(1));e.default={generate:a.default}},function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a,i,o,s,f=n(r(2)),u=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function h(t,e,r){var n;return(n=Math.round(t.h)>=60&&Math.round(t.h)<=240?r?Math.round(t.h)-2*e:Math.round(t.h)+2*e:r?Math.round(t.h)+2*e:Math.round(t.h)-2*e)<0?n+=360:n>=360&&(n-=360),n}function l(t,e,r){return 0===t.h&&0===t.s?t.s:((n=r?Math.round(100*t.s)-a*e:3===e?Math.round(100*t.s)+a:Math.round(100*t.s)+i*e)>100&&(n=100),r&&3===e&&n>10&&(n=10),n<6&&(n=6),n);var n}function c(t,e,r){return r?Math.round(100*t.v)+o*e:Math.round(100*t.v)-s*e}e.default=function(t,e){void 0===e&&(e={});var r,n=[],d=f.default(t),g=d.toHsv().h;(r=g)>=0&&r<24&&(a=27,i=5,o=13,s=15),r>=24&&r<56&&(a=34,i=5,o=13,s=15),r>=56&&r<170&&(a=20,i=5,o=10,s=15),r>=170&&r<190&&(a=32,i=5,o=10,s=15),r>=190&&r<250&&(a=32,i=5,o=15,s=15),r>=250&&r<300&&(a=40,i=5,o=15,s=25),r>=300&&r<360&&(a=22,i=5,o=13,s=15);for(var b=3;b>0;b-=1){var p=d.toHsv(),_=f.default({h:h(p,b,!0),s:l(p,b,!0),v:c(p,b,!0)}).toHexString();n.push(_)}for(n.push(d.toHexString()),b=1;b<=3;b+=1){p=d.toHsv(),_=f.default({h:h(p,b),s:l(p,b),v:c(p,b)}).toHexString();n.push(_)}return"dark"===e.theme?u.map((function(t){var r=t.index,a=t.opacity;return f.default.mix(e.backgroundColor||"#141414",n[r],100*a).toHexString()})):n}},function(t,e,r){var n;!function(a){var i=/^\s+/,o=/\s+$/,s=0,f=a.round,u=a.min,h=a.max,l=a.random;function c(t,e){if(e=e||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,n=null,s=null,f=null,l=!1,c=!1;"string"==typeof t&&(t=function(t){t=t.replace(i,"").replace(o,"").toLowerCase();var e,r=!1;if(C[t])t=C[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=U.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=U.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=U.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=U.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=U.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=U.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=U.hex8.exec(t))return{r:q(e[1]),g:q(e[2]),b:q(e[3]),a:z(e[4]),format:r?"name":"hex8"};if(e=U.hex6.exec(t))return{r:q(e[1]),g:q(e[2]),b:q(e[3]),format:r?"name":"hex"};if(e=U.hex4.exec(t))return{r:q(e[1]+""+e[1]),g:q(e[2]+""+e[2]),b:q(e[3]+""+e[3]),a:z(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=U.hex3.exec(t))return{r:q(e[1]+""+e[1]),g:q(e[2]+""+e[2]),b:q(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==typeof t&&(B(t.r)&&B(t.g)&&B(t.b)?(d=t.r,g=t.g,b=t.b,e={r:255*P(d,255),g:255*P(g,255),b:255*P(b,255)},l=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):B(t.h)&&B(t.s)&&B(t.v)?(n=I(t.s),s=I(t.v),e=function(t,e,r){t=6*P(t,360),e=P(e,100),r=P(r,100);var n=a.floor(t),i=t-n,o=r*(1-e),s=r*(1-i*e),f=r*(1-(1-i)*e),u=n%6;return{r:255*[r,s,o,o,f,r][u],g:255*[f,r,r,s,o,o][u],b:255*[o,o,f,r,r,s][u]}}(t.h,n,s),l=!0,c="hsv"):B(t.h)&&B(t.s)&&B(t.l)&&(n=I(t.s),f=I(t.l),e=function(t,e,r){var n,a,i;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=P(t,360),e=P(e,100),r=P(r,100),0===e)n=a=i=r;else{var s=r<.5?r*(1+e):r+e-r*e,f=2*r-s;n=o(f,s,t+1/3),a=o(f,s,t),i=o(f,s,t-1/3)}return{r:255*n,g:255*a,b:255*i}}(t.h,n,f),l=!0,c="hsl"),t.hasOwnProperty("a")&&(r=t.a));var d,g,b;return r=j(r),{ok:l,format:t.format||c,r:u(255,h(e.r,0)),g:u(255,h(e.g,0)),b:u(255,h(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=f(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=r.ok,this._tc_id=s++}function d(t,e,r){t=P(t,255),e=P(e,255),r=P(r,255);var n,a,i=h(t,e,r),o=u(t,e,r),s=(i+o)/2;if(i==o)n=a=0;else{var f=i-o;switch(a=s>.5?f/(2-i-o):f/(i+o),i){case t:n=(e-r)/f+(e<r?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,l:s}}function g(t,e,r){t=P(t,255),e=P(e,255),r=P(r,255);var n,a,i=h(t,e,r),o=u(t,e,r),s=i,f=i-o;if(a=0===i?0:f/i,i==o)n=0;else{switch(i){case t:n=(e-r)/f+(e<r?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:a,v:s}}function b(t,e,r,n){var a=[L(f(t).toString(16)),L(f(e).toString(16)),L(f(r).toString(16))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function p(t,e,r,n){return[L(N(n)),L(f(t).toString(16)),L(f(e).toString(16)),L(f(r).toString(16))].join("")}function _(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=T(r.s),c(r)}function v(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=T(r.s),c(r)}function m(t){return c(t).desaturate(100)}function y(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=T(r.l),c(r)}function x(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=h(0,u(255,r.r-f(-e/100*255))),r.g=h(0,u(255,r.g-f(-e/100*255))),r.b=h(0,u(255,r.b-f(-e/100*255))),c(r)}function A(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=T(r.l),c(r)}function k(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,c(r)}function w(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function S(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+120)%360,s:e.s,l:e.l}),c({h:(r+240)%360,s:e.s,l:e.l})]}function H(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+90)%360,s:e.s,l:e.l}),c({h:(r+180)%360,s:e.s,l:e.l}),c({h:(r+270)%360,s:e.s,l:e.l})]}function M(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function R(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),a=360/r,i=[c(t)];for(n.h=(n.h-(a*e>>1)+720)%360;--e;)n.h=(n.h+a)%360,i.push(c(n));return i}function F(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:a,v:i})),i=(i+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=j(t),this._roundA=f(100*this._a)/100,this},toHsv:function(){var t=g(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=g(this._r,this._g,this._b),e=f(360*t.h),r=f(100*t.s),n=f(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=f(360*t.h),r=f(100*t.s),n=f(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return b(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,a){var i=[L(f(t).toString(16)),L(f(e).toString(16)),L(f(r).toString(16)),L(N(n))];if(a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(100*P(this._r,255))+"%",g:f(100*P(this._g,255))+"%",b:f(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+f(100*P(this._r,255))+"%, "+f(100*P(this._g,255))+"%, "+f(100*P(this._b,255))+"%)":"rgba("+f(100*P(this._r,255))+"%, "+f(100*P(this._g,255))+"%, "+f(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(O[b(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var a=c(t);r="#"+p(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(R,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(F,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(H,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:I(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),a=c(e).toRgb(),i=r/100;return c({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},c.readability=function(t,e){var r=c(t),n=c(e);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,a,i=c.readability(t,e);switch(a=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":a=i>=4.5;break;case"AAlarge":a=i>=3;break;case"AAAsmall":a=i>=7}return a},c.mostReadable=function(t,e,r){var n,a,i,o,s=null,f=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;u<e.length;u++)(n=c.readability(t,e[u]))>f&&(f=n,s=c(e[u]));return c.isReadable(t,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var C=c.names={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",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",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",green:"008000",greenyellow:"adff2f",grey:"808080",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",lightgreen:"90ee90",lightgrey:"d3d3d3",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:"9370db",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:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",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"},O=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(C);function j(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function P(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=u(e,h(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),a.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function T(t){return u(1,h(0,t))}function q(t){return parseInt(t,16)}function L(t){return 1==t.length?"0"+t:""+t}function I(t){return t<=1&&(t=100*t+"%"),t}function N(t){return a.round(255*parseFloat(t)).toString(16)}function z(t){return q(t)/255}var E,D,$,U=(D="[\\s|\\(]+("+(E="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",$="[\\s|\\(]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")[,|\\s]+("+E+")\\s*\\)?",{CSS_UNIT:new RegExp(E),rgb:new RegExp("rgb"+D),rgba:new RegExp("rgba"+$),hsl:new RegExp("hsl"+D),hsla:new RegExp("hsla"+$),hsv:new RegExp("hsv"+D),hsva:new RegExp("hsva"+$),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(t){return!!U.CSS_UNIT.exec(t)}t.exports?t.exports=c:void 0===(n=function(){return c}.call(e,r,e,t))||(t.exports=n)}(Math)}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ATCOLOR=t():e.ATCOLOR=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var o=n(r(0));t.generate=o.default},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var o=n(r(0));t.generate=o.default}])}));
{
"name": "@txdfe/at-colors",
"version": "1.0.5",
"version": "1.0.6",
"description": "Color palettes generator of AT",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc