{"_id":"tinycolor2","_rev":"56-66f1785acb49f70526ecd3b32821f813","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","dist-tags":{"latest":"1.6.0","beta":"1.6.0-beta.8"},"versions":{"0.9.9":{"version":"0.9.9","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"_id":"tinycolor2@0.9.9","dist":{"shasum":"303e3d068a17422adb123b7ad8a8501b826457d6","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-0.9.9.tgz","integrity":"sha512-KOOHp55vTs65fa/cU+5dWaHuNHGFC4XTRvhF0ezs7/gtdNAnpmgNnUY2HohP57eXdSEiE6I49QvB4NXYW/sfBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1cTJmB42jN6vcsIE/YIrz98WVksfP1zCOaVavHbFw7QIgTfCUltMUpqY0y7GceQHlEvSDeiVJjnrmh8WOx+1133s="}]},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}]},"0.9.16":{"version":"0.9.16","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"_id":"tinycolor2@0.9.16","dist":{"shasum":"d9cf85c2ddecd684a64701a208d017d516197288","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-0.9.16.tgz","integrity":"sha512-25mmw1xr0I1DUnnu1PmMvuKQ+1SMU3Q1QXvve1/+Scdhp3iXYGpTPrp3oFEU1NfLiT6pHNk//7Xp5wJ1WLFcEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDvUl+/xb55QbGLiwAYwmquFfUQTvgdoewf4UuEbZsvHAiEA5KIQDwZ1zSG5SybQvzPgFC+iq3M4vntEfSD1WyPud6s="}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}]},"0.9.17":{"version":"0.9.17","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"_id":"tinycolor2@0.9.17","dist":{"shasum":"0250a68c9066f69a941ef7bcded099413cdd6837","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-0.9.17.tgz","integrity":"sha512-481Cm47udMOKgcdF/UxvxO9e+C13tsa+hTv9CcGWwclDyA3sc1uY5/s5e6pc6npacOcvdChfdKqaEVyzY75QiA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxvpumcMklXox5GnQArbzMMKjIhxApo7LoJtMJl2j6qgIhAMnr8m0DDIdgenQAvq2NhJnKg5qiUxsI8rT0dKDiXHWW"}]},"_from":".","_npmVersion":"1.3.6","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}]},"0.9.18":{"version":"0.9.18","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"_id":"tinycolor2@0.9.18","dist":{"shasum":"fdeb51b119188c54d98dbd93751e541685140996","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-0.9.18.tgz","integrity":"sha512-WWlZBvla5rX4aWzS1KsBpCsr1+FpskAQjItxQ5jf++xxf4dwPks893GzqWfbTl1+xylK8KR9SNl0AfkIiu7lQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvkhHXtZXaS0SD2z9iXbdHmgpyp+v2s/c/5JDMQ2SDKAiAyXmpHwYjGpSbL/s4gPXNUqpYLaNI/teRu7zK9oNY+tA=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}]},"0.10.0":{"version":"0.10.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"_id":"tinycolor2@0.10.0","dist":{"shasum":"e554600ab4dcc1f7fb0ca26494791e3ec62857ae","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-0.10.0.tgz","integrity":"sha512-k1m9zU2aqGKcIdgfIEJvb/QeHNPD5zaJL0DuhNMiFmVulsGCMWGCRTe/UdA5lZs3l0HJu5lF5sdjveHDc49b/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDThT8sdKGBeU2lrIN6NHgz5EJBt0wHxNfVtKk3/mscUQIhAPfe8hj5BAi+NmfM2wmursVFXArkcFe0RbqdAWfXTdv5"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}]},"1.0.0":{"version":"1.0.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"_id":"tinycolor2@1.0.0","dist":{"shasum":"d32c2f2c8abc5bb3d21bf7fba16825357d4bbac3","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.0.0.tgz","integrity":"sha512-7kTKOQ/h7Bg1YwtmJHc6HHlS3N3gBCUHJ7DmtVsovmYv6TU58j5oE33tNsxByLxH3unUSkV+JYIpdZuNV0Xk4w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICw+ja2ZP6/ISlXoHI9u2HvDX/aiL7qOuenZU87NWPPOAiA5u5vnTTLotRL4TKfmY7axmo8A0epQppNyPod4wiVJvA=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}]},"1.1.0":{"version":"1.1.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"44ac02cb4a2c94f80d07dbceb83ee1b5cebeabcb","_id":"tinycolor2@1.1.0","scripts":{},"_shasum":"8ac68e6282b14bf7dadee677d7acf28c7720ac6a","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"dist":{"shasum":"8ac68e6282b14bf7dadee677d7acf28c7720ac6a","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.1.0.tgz","integrity":"sha512-VGJTvtavd8dtWhezNE9OY+a6LCg7mKv45v+kuK8RDCpJnBL+BEy2IgOQNjAo+Fx087IPv+VsXbSKN6fdM8oDUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGFWQbH/ybDNA5ABsBIh2N9RnKapQa6Fbw6X70hRgJc2AiAVcWsId84WvjFc+I1wOKVSIm1e0Tj/v2TtoRJ2B8kHPg=="}]}},"1.1.1":{"version":"1.1.1","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"8048867985064975ad10f140dc270f2c836548b0","_id":"tinycolor2@1.1.1","scripts":{},"_shasum":"1b5dd2cf50c7bdc3d67f0b8a748c4766e93ca392","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"dist":{"shasum":"1b5dd2cf50c7bdc3d67f0b8a748c4766e93ca392","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.1.1.tgz","integrity":"sha512-yT+SPSMSwcyDZrlUx8MCxi+4a3E0LjlHrKUDX7DN7uMa0x6QJCRmu+11WgmY401rmci341ojm1MZ6SyLnVhr+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOyYGhV52dxPZ1I/TdPUl0XqfmNREHrDgUMPOFWQ9EUAIhAIITNHCuGAyYqnNJ9yH61U8h7WpE49W4WiY0Dubw+1+8"}]}},"1.1.2":{"version":"1.1.2","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"~0.2.2","grunt-contrib-concat":"~0.1.3","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"8cc9ee6251a05752013af0958ece80e68c1d9c6e","_id":"tinycolor2@1.1.2","scripts":{},"_shasum":"690b13c0ef0556bc7253856a93c3cc42b09f35e9","_from":".","_npmVersion":"2.7.1","_nodeVersion":"0.12.0","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"dist":{"shasum":"690b13c0ef0556bc7253856a93c3cc42b09f35e9","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.1.2.tgz","integrity":"sha512-Osd/faNrV+dWrcvMmscDmyQSW4QSbP56UOfGWN6L2bskmeiHxHxz4IQieBoBOKpJ1eF8nzhy5K3UcIorM4zaBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDjtSZTcxM63hGPKJhKGIVF66Mro+OkPj9duUQseh0DUwIhAP/EIePkQaL5+DsUKObHLsAJY0Pn50Mr9slElSbuQPzL"}]}},"1.2.1":{"version":"1.2.1","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.1.3","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"^0.7.0","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"0c95881a00bf7b81803ad45b735df8efa24c7061","_id":"tinycolor2@1.2.1","scripts":{},"_shasum":"6f007cb9b64c0c26f4796f2e7e595c6c3ee662ac","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"dist":{"shasum":"6f007cb9b64c0c26f4796f2e7e595c6c3ee662ac","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.2.1.tgz","integrity":"sha512-+dg3ODzSSlDGiFnGwHsokQCFCUuFTG/GyFjnk9MRp9tWcBNUOU9ofaNyV+e/WaO4rEJsjzgUNeHRC87JiMaogQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOqVP9wL9kAeJ2SOC8hDLTaMabYMCdfjYtPnK4xtt2SQIgGYS3Lzj7VWTeo0e0Dyw6HdgxHsDqIusS2/8/xFY4//I="}]}},"1.3.0":{"version":"1.3.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.1.3","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"^0.7.0","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"71379c1cb50cedab2386a3b40f07eb866697d679","_id":"tinycolor2@1.3.0","scripts":{},"_shasum":"3f38e6424de4566122d550eb1acc80cad37a7184","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.2","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"dist":{"shasum":"3f38e6424de4566122d550eb1acc80cad37a7184","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.3.0.tgz","integrity":"sha512-piBHuUZGVBVqS1v2FPyjuAXMllE1+K0Ik3CAC6c1cIL/HIYIwCRunqjZBPsOCLVkdMVfhTsR3ansmPirSO9A5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGEFrawnGFkHza6z6gf6PAUlLLaD3KNTBzFdHwwxl6VDAiBrb+A7r9FrqD0Z50u238RIJkmjcUGKM845l/LJ7UjJBg=="}]}},"1.4.0":{"version":"1.4.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.1.3","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"^0.7.0","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"926c9fe7cabe009affcb761cfc44d146fc20e28d","_id":"tinycolor2@1.4.0","scripts":{},"_shasum":"e34911512212252a217f7b1dd2aedf321a3403cc","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"dist":{"shasum":"e34911512212252a217f7b1dd2aedf321a3403cc","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.0.tgz","integrity":"sha512-a7XyiO7sDw+ZBWVhns/EkpUhgsp7KgZ/zSy36kP9Rn5bVMrIby8GRigtwyORCrdzm5s3Qc79pM502U3zC2iutg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFsPK4he/c4ZxhytNSmd5TKSIzatspn1VaVekj0DyzAtAiBN23VF0y923n0vcmTqtRf19siEKmynfNPNVDl2aDnVlg=="}]},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/tinycolor2-1.4.0.tgz_1467941969124_0.17321573430672288"}},"1.4.1":{"version":"1.4.1","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"https://bgrins.github.com/TinyColor"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"contributors":[],"main":"./tinycolor.js","directories":{},"engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.1.3","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"^0.7.0","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"80f7225029c428c0de0757f7d98ac15f497bee57","_id":"tinycolor2@1.4.1","scripts":{},"_shasum":"f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"dist":{"shasum":"f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz","integrity":"sha512-5gQXogvRKAhJChgQPSAXaXbrQVq+w2Ckl/5jeno5N9eMcYbz0docSS3n0YNywAyDQBsUFokmHzNM8yvX2+eLVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3N+lHcoBorCKmV9SkYzLEPC3WWQZ6PlP9FqEWgxGdQwIhAIwPrXuG/OjeQ17Jue2ldmt6+B6vMoCmxDar1SU/s3Hl"}]},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/tinycolor2-1.4.1.tgz_1467942501619_0.5755986487492919"}},"1.4.2":{"version":"1.4.2","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"main":"./tinycolor.js","engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.1.3","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"^4.0.0","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"ff16c083d0598612cff9d1f98a3a06e8d9c82112","bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.4.2","_nodeVersion":"14.9.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-vJhccZPs965sV/L2sU4oRQVAos0pQXwsvTLkWYdqJ+a8Q5kPFzJTuOFwy7UniPli44NKQGAglksjvOcpo95aZA==","shasum":"3f6a4d1071ad07676d7fa472e1fac40a719d8803","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz","fileCount":16,"unpackedSize":414428,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbi5GCRA9TVsSAnZWagAAgaQP/Ra2B58dvmwYn2LcjGcL\nP9fb/NxvdLeLFgEweVR8hkhSthc85NgPVRajraFD/63746UYKre4Oud3qYzC\n+1s/U8EjTEqVMEX9ugCSCCYiXC0Ma0Ra5WwNBX4H9U/5ui3SN8Zw918ilw0o\nGKMy5RPspkfaP72jNABVgqH91e0VUYBhE2mBi1k8yA2+VcZnh+mXt4adEztZ\nRoUUnDdf5EQgdqeiN7zygUY8Wtpgyb7GtAqG2OBFfWDkvI+kIg2C99Gtag4Q\nizXX6abnpk1DCf29P+NITGh7OdQmZG9DrFfwy5hSG7j1huXHwgSZQAcUmwPm\nLxMAqAks9tXxdvWPnprPzUWeKRzcrnEA7aJVuggfeDoK8PcWHHT0VgJUIVNS\n64tsd8+dmF00cwJ3uvucvMu7hA8oYkZEPo0BGoSnxOxkW4sRW3ljZ2CFtozk\nYh4ybltRCKTWFYY2A++9RnK3xg/t0zq9YhpWKPuTUo/obHcz2uYanIwgEoZ9\ns3rGkusiSQ0N0KK+DBjz1q3wgj9p8z4qEA5mD6QOd9Vhy3L9G6BW2ygRYYlw\n66WW/rvpRCebC7BF6G73xyZrgRzj/Nu3XtPvj7ManUYzVTcTC5MDqW58QYy0\nzhd7cotY85839A22rjD6Xv9190ejRkpqjrkEf8k0XoukkVDAFDYAhe4G7xF3\nBvVD\r\n=gU4t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwQkIZFVv0peSW82OBxYOepk5FxQXMpaSA8WtXlWZsKAiB8rWmSMjNkipMdUzalAqdfPp85C3s4eJGDScNR+fhCNg=="}]},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.4.2_1601056325733_0.9064086703049148"},"_hasShrinkwrap":false},"1.5.0":{"version":"1.5.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"engines":{"node":"*"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"gitHead":"978a5c7f9d6d6201f532f41f666ae922d74f9285","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.5.0","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-opkFmTUuHQJj6/+A4B432NAptta/ytJq6UiWxqa860hSvMG9m3FxsbR4jYQfdXf59H1aE80Yd0UpFjhbg1e/zw==","shasum":"d504eb1f1ae84040f686fb74d5edb651d0968a41","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.5.0.tgz","fileCount":9,"unpackedSize":185544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCGrOZlrK0gZc6uc/XxU1utqe1dcoa91gyVPKUp6zQFUAIgEvO3g8MRwsn5E6SiRX0rE5056zcSeVldAs1ZrKjClLw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjo4sgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWZRAAhnKvS46BZHXiNc2wTlRvkYofNx6WBxw6qfaSe6V9zs0eQlDF\r\nOg2AAtazWXhMbYGMCUJhlrJj+KEXhC5+ironoCS60G7lRDfEs3/seyqXhcuB\r\nf0EVx5umX0VpbBGPmJNZfp+yhgNuGxBAsxC3MvASdi2ZnI6NynEJQq0BIO2Z\r\n1Lpao7vLDGog7VN6e3TnwSNG626SuWC2Yr0KdeIIgbuUAMCwFiyWfnsAee3s\r\nMV2le49FUGbpx8zVe3vcgiwSnsWRSkdnVQzuLoX6joWP0WXqBreOcs+xOr9i\r\nMuQAiMN8lSEjQXAIPOB77L9LAr8y56keBzUMKeZq0rYiUK+2vIXHtIyF4a8r\r\n+Lmc/8TE6burFnW7NjtBeXEBKG3uRoaaN1d1pr4SwdB+4/OQPPGLCMLOb4l4\r\ndy6ZVRdbzler7EPd06GPDVFkwBatbcqbqDvj0sFdFh4jSuXg4KzO3ImoTpzj\r\nyfKxkNrTeyYdBp8iAZSFNz+gV0/GnI7i9qbiWsn/PdGQaIamyyVVyWbL6AID\r\n3qoLy9zZfMlKB5/yOuXIMbZX3TBuJ9JCZFQ7vQ2eyWK0x/bpweZlN9YlAKGC\r\nIO+OYDtO18omD5heBTImNMG8FcYqWBut3YMm7aUTYZeSVKMj3a5sZYGytBk+\r\niU7X6rqZyOoV+UN5qxGOBft6Jy+Jhel0yBk=\r\n=HGFC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.5.0_1671662368127_0.6729574936878542"},"_hasShrinkwrap":false},"1.5.1":{"version":"1.5.1","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"main":"./tinycolor.js","engines":{"node":"*"},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-concat":"~0.1.3","grunt-contrib-jshint":"~0.1.1","grunt-contrib-qunit":"^4.0.0","grunt-contrib-uglify":"~0.2.0","grunt-docco":"~0.2.0"},"gitHead":"ff16c083d0598612cff9d1f98a3a06e8d9c82112","bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.5.1","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-BHlrsGeYN2OpkRpfAgkEwCMu6w8Quq8JkK/mp4c55NZP7OwceJObR1CPZt62TqiA0Y3J5pwuDX+fXDqc35REtg==","shasum":"df11c5f14e6b7fdd8a9c27c2c6a5f2565fb776b7","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.5.1.tgz","fileCount":16,"unpackedSize":414428,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJAnJLIIj4o+lNWdm0uVhvXhqNE6+oH5A6+FsGle3i8gIgUnwUtuIa1fP/OTzHc3TweH+9Wg6wkLijDpxkVHRcGoc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjo+xXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXGw/+M/EDE55xYQEztWm8ucz5konB2euVDnEgx/InfvBAh32H5v1O\r\n3KaswoxvXvFdYnRsH5s8tiCyJlS3kgVxLpu3YTEK0QcziVhdjQXBWeqDbzCG\r\n7/Ncwfi004bLl6z1SfxM4SidcZE8ARl01I1tSiOmt5MwhaekCuv0tHmrrzy8\r\nhqx5TDumAz5J/8Wwx4hLqKIPJvBR0Bzi6wauRBNPGeUcLXiWEP0OaJJ7ivAt\r\nkVWBWiXf6ba5enAr/yKfxdJuhsJmqvlcK/S1k5QJ1ep+UhWfWUUYPG2WBHDq\r\ngbXajdnyhDyFcgYt8cDu/V7LEHgF3ZCV/eLN03eZzVojZPdhy2D0Yogw/5/l\r\nlCyx67kJSJ15lldlMGeXCTpAOdLKHQwFzLni3MVJTcd6xvIgaifA0L/1bGQG\r\npmOUGgLc7U6omuTkRlK51VwY6Z6/TefGIe9S1c30UEyXOk+Gd/O9Jky5Mh6m\r\nNL4+JLRYcokxXAUAYy0VB8MVXAElJWjn+k3t+/QX9w5QfNEA8CUzXkYseR7m\r\ncV9po/8RpFSpAoO56dd9MHURBJ1t5PghMNcpkl9llzFtk4tinJcZQGQFVBMO\r\npv+AzcIcPrKUxQzC0boJCq2LdfxwKnWyPB3qSzUM81lJXqlGvByi1fIMXrfP\r\nBMWc8N5Fo+kP7s/h9pot7lLZ2+HjPUzZNXo=\r\n=xp2e\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.5.1_1671687254994_0.3900260968374678"},"_hasShrinkwrap":false},"1.6.0-beta.1":{"version":"1.6.0-beta.1","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"646321aa3c20f3078d757c4bcf83bc539e83b61c","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.1","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-4X0i3n2W3/++DFyef9vV38nJJMYqRjJGDlHhB9UhYDqXJgI9SKgd6nBQThhVlq+0UG65t9zX/Tu87ZenJOB2uQ==","shasum":"d805b9117b317c73cfe8caff64244105da886dc3","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.1.tgz","fileCount":12,"unpackedSize":229624,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDB1KCyzPjeeczpbFzhsgxv2hRgWbUD0UytbaFSU1v5fQIhAPOZDGIdCudHKo7HDM3yna9o4RA9S2brYDw3vvngsTp6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpMvhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0uQ/+L2QSzB1hugBW+k7BWqVng83x6qjYFbf3UEJB+oNZ+ZmCwMGk\r\n2T7KlSVxz+E8ErPZ44m9VzanXkrpKsZGDoxnQtYFAmfKyhkfryOEy/ksJYg1\r\nkRhIO6uSxYy+n50HE4pC4n9W2UW3W20dvn5zS1nSpCTuhm+qCCFJwdCzXE/1\r\n8107kAZiPAgRHD3ywwbNGY35ghpQCye58PXlYiYTMYSpYPBEMwUH5Tie/6eX\r\nDF/LQ1oMFwzInRFbxL1Vt0YZOKsWSpN+/55aGYIsJ7tHLFTOO9uMhyXeXdgt\r\nLjphQDTy1BoxhgkTDAdwwrxZVqg49Iq/yNvqQiF47rGgJx2xdRsE6dDOC4TO\r\nav6bBzKhfywc5kdksN1v4rs2YXt/Jc5C5e3T3y2h97RzDO0ZJgnCE4cNjdCi\r\nxmaZk3l47Vf4Ukg7gNQGsAYvgu8V8CKPgDm4evnd04I9f/D+zyb+zgVeO7LK\r\nUMy+FMQ19FYI2ovCK9rlbT66lvhydw3LQLVPZmmDS1n0VYF1Ap0lLeH/AX9N\r\ncuqxzzkhyMSgCXZf2SLLJ+H0bEsbYwAQJEz+zg82XBLm4WNGv6RaAAom84nc\r\n6BnaOC+YBTW/D8la793kIQrlHCl6Ns5UkxCm+fUD50mVi9i+8IDVuMfwTAEc\r\nrRVVveDiuuDsDNT22dewJ+V34vc+OE9D9/w=\r\n=jwPB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.1_1671744481711_0.7038048336762761"},"_hasShrinkwrap":false},"1.6.0-beta.2":{"version":"1.6.0-beta.2","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"918532df4e4f6898aca6271dae1d9d1b134cbd4c","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.2","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-v4ryVA9iPijSH0Hh3vbRl/zLhLuo3yqwaqFrTMiQaFdfZHh3w57q3RPI1a7hD1uyb10sM1qKz8c4SMDvblOZMg==","shasum":"bbe7107059641b25a7af97b4a222f7dafdb6a663","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.2.tgz","fileCount":14,"unpackedSize":282600,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGig2abwXjhpdD0/vshZc+LYYNKT88Y6OLq1pJYkuE00AiEAzKTPGJWkYySyHQK8iRJ7OL3hHOEgui9byFxwgTqaLE0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpO8BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3IxAAlBzww/OVzDmSwLbnH7uzwnoLGVeHoKtowFEKTeL8KHZ7GApw\r\nLWAg7PrN11aLuttXhlm/B/SLF6qWvGHn7XRp2csBIL+nxjV/hxSfsUmbILCA\r\n9GMH1Be4ZM50cu/c8iQvWxsviyBXsSSRuFGK716NcFNBA+E7SjuEHudPyFId\r\nai/WTUjn0YEGfk/KpvC+g52McHn6U8C8aoyaAhlQNBYzf1drbAeytK8hzmDE\r\nlAS1L0YNSRJFdB+tTlO3iAJ66Q+GWRewLgJ6GB1cb8k/LpFvNF+TqwX6o7+o\r\nXm+n+0djEfQ4oi+2f+9N1ySRkXdqd1Hq/zaLYKZKC15ERX2zvAzeyHVFkngZ\r\n0gTotaZxh9j3P+jfB/LQTiRTfL6Nj+f1p87/I6MK2Pmns2oDkZcR6/L5wOA3\r\njV8NBL+mk1MLltrqHZOEn9UMgUcJOYdJA7YWHlinw5FK3cjTooSofDjw3O9u\r\nakqUslPDCSH7p2Xb7Mn62VHbZRxLddnOTHx+XKp7K7jtDsGBz201g5/1ZFcZ\r\nrVpP1ZCGWjQChlU1J2th1YpH29aEy0fTH90BuczEpBW7hRsbi8wamCGyiIGR\r\nmkkuQ5r5Ja8uPJxg2WH19bHOoXSta0Nk5eVouvM3NawjSPgbobjeZGFy60ff\r\nZBTebQQbsspDACTczRQVzJAlU2fzDz1SsQ8=\r\n=dv0r\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.2_1671753473494_0.6986925948939191"},"_hasShrinkwrap":false},"1.6.0-beta.3":{"version":"1.6.0-beta.3","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js","default":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"5b22521cdb66046a737f22bbcb6f308c28bf7801","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.3","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-YL5HjDnD9frE0A9bVLPVbQg5PEQCvXLbR1IWFApsDNdVSlIZww1pahj4358GalT+Hgb3s6qaSwYdQJ9t66ao5g==","shasum":"d5e3034bf73d9370fdf256fe29a72d8773991cf1","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.3.tgz","fileCount":14,"unpackedSize":282623,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfiiJ+La26XA6RE7Cf51zpiF+56XzvBaRsLYG4/+tw3AiEA9KExyH3LrRjulBmw6zJJ/Lgx6MYaGSlf/tHgMzU52CY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpfOKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNpA//aaWZhhcfDkpMwYTNjLfeNkPB0sgvTSNdxmbFE5WXr5rpQ4+3\r\n5RmPrElfD02+DMmsluN0vrR99waBo/aG6NJoHiIZkdvugBIYtP2nC6S76Mdm\r\nSqxQmTAhfJbSk0EimCZ1hPXDjkV3otveomxJ4IH/jUFrI974fq96oPs/H07V\r\nOVbuJeIFubdHbanyWoWSpFuW9UqkFD1NEmP2MGwotwIMSTHq8eCiaTN7ZorW\r\nMULH4GoS/or8K1Bp7/oRYzq1ZkHYePjq1j0MivVLX9Bb3b1KEzsS5rkH/A9I\r\nBdf4jdGyaeBThoIz8W/AI+VkofQKY+DVCXgvN48eCjZEpCMBMVcxLHmchT/C\r\n9h2cmFka66YnYmsmijU8zX9De2E62t8uuOtn89BExAMko5nHbUa8pqyXV//A\r\njJxE2QS6EV67WDQwlpkms7pFMpaImvDc4YYBEcUGkBG9ubrS40yNY8GT05Mc\r\n3jCEm9KoWm5WjeZNfDPWbZskmCkKRUd4CM8ByUqcWOYQfVZgXVIbUBtwsesF\r\n/csxgPtRH4ubPY2kgX8r8cGa+/rm2fXxl/xZWsGv7WmcpiMMiLCLt7YqtQmQ\r\n5yshmBIvPulRBN9kjjBiGsXE1QqXzXbdk8IO9Tzyo8Nh7oTUCVGSXELplOPa\r\nYPIW9bVI6xs9iySy8bmISKujidJTr10P5Pg=\r\n=kZeJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.3_1671820170457_0.22737879197697075"},"_hasShrinkwrap":false},"1.6.0-beta.4":{"version":"1.6.0-beta.4","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js","browser":"./cjs/tinycolor.js","default":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"5b22521cdb66046a737f22bbcb6f308c28bf7801","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.4","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-5+CnBld4OF1E168egSeOJz4tq3Pn93W5fCj+G0nUNGPcnvLnYZu8Ui0tUZYG44TgXxYUJh1tOZ5juqNZqPPytA==","shasum":"265e89182931728570dbed027d2b3e41f1eede0a","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.4.tgz","fileCount":14,"unpackedSize":282662,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCh2nxvcLa7aOIUS11FNwnpKrJi2aLaQzD6XjmM29BnnQIhAN+Nvp5f2omCBOnHj9x6Y+cHJeMirPADBDDFd0a6ypOC"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpfc6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4XA/+N7zYhH+rpp2JX6rqpii7yhX3ywl8Z749ylP9GCl/QT533B81\r\nvQk56b2keXpuZUPDJf2pcItK4Gp+YNN2DbH2w9lLp3ibxpCDBgDux7/0HTos\r\n+fC1iV95w1JyOuQw+zG9RZc9fu37tHQQg9FQBeAmXIGh+IA+c7oNgkp34aQq\r\nrFtPe/bUANH6leMxMNKqYVeetfIVdllHgK0JXlLYWSq6SIKkV1KDMae7jsJX\r\nkI9k7BVvlgepAZOu+MrBtAglmkHY1Hs5AR4FkMPqfD7qgfFQkazUCQQsP6Aj\r\nhvtzOWH0bg/jVjUZl6PSqGBQ954/GwrziWYygBgtMcrWIegBxV9G6y4uEPqA\r\n46oZOpoczzXHd4ClyZ3cyvMOS43sgEU8WVDqCrlLU8BTJspAHUmH1rCUGysJ\r\n8sxjLwuZR32ilfb7zGbxCCkSx0OXwEGZSP7DZ+ojBfY0fZ67JuIho8XWeMPm\r\n+kY8OVtenPkWnJlLQHn09CBtHU/DswviagDX1+/wrDVGcfasWTWme/77rMWH\r\n5A1KqLbdb6zrO1FGAxMaj7ZHjrinf9FdRzZvgxlq47LvZ0KuXypNDZ8bnbuZ\r\nuzql8A+ay9p2m5bluP6sMWtBKs0C3nJIW7F5ZNC9imFKCnAynJUgLq1fXcjJ\r\nOrW/x5YRtaIzESyoIG4ksQtMvE9H4x1TuuA=\r\n=TGmR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.4_1671821114369_0.49905060233526477"},"_hasShrinkwrap":false},"1.6.0-beta.5":{"version":"1.6.0-beta.5","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"main":"./cjs/tinycolor.js","module":"./esm/tinycolor.js","exports":{".":{"require":"./cjs/tinycolor.js","import":"./esm/tinycolor.js","browser":"./cjs/tinycolor.js","default":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"5b22521cdb66046a737f22bbcb6f308c28bf7801","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.5","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-trUToP1S5lPVmhaSzejM4vhsM8eQU9Y6hplzEBE2kITBPJXM/ThWXrUFJznoRAZy6zaSbf+RIacDbpwv6MlhkA==","shasum":"62c032dfcdff4ecf35ca34a692bb8e31ca0cd19e","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.5.tgz","fileCount":14,"unpackedSize":282662,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIELvmMBp+q/7lyyhzCaE4daAs3GdPK+a25M/bYIDqBO8AiBSCJ3ci2hV02RwnGxDtoqWO5TttvN6cJH1RXZJnfqguA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpfe+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqafw//f1YrO1xxZMTQEatbYF/UGhqkjnINECHA/n+ML++roidEolgJ\r\nP+GMoyJe2wnEQVQ4Hnmu7GHbOJ45dI+80MCl9q1lC3Yo4AVnSqrq0F53JiSK\r\nod7YKmNkd6N6CCib/z3AN2XiVbns03bnyYaa02w7b0jG09XU333NwkOljGBh\r\nqVa3IVXjNEWeYkQtjqRwrmDQW/H8YJFm3hVRnTGXQjq8lPEKGDot1AmgRQij\r\nJY2YzNNaL9uhDfWbsl74N0Kn1HPpEzkydZWJvRyTbUvSkkOZ9unLU3WeOGCL\r\nlqN2nvIiJWrmNziIXYZehrppQMV3okWI4BgHCcAlr/Smv9W0f945Tmq2XC4s\r\nC+tsiB8axoQ/36lklQFh77KNbHZfyWiBgbNVXmQWUSYfrst1slyQ5GKq3gLk\r\nVlnz1DGIVxoN4Ma03Ewmn4+BkoYnUHXnkTg0nUeiVrid/D+hZmjrIW0NyKVc\r\nUT9YDuCX4q2LafaeJmlPv/Zou5/CQO/v/xS2chdWQmqmb8FgTA566g3/BpjW\r\n5I17a0HuP4s2IkTqw2yzSrddo4xt7AFinXvEcKmdBatGzg50PIUz2Zjy7HqG\r\nUxMy6jVFgkwkp9zO0ufph+61yZhUPglTR4gcKTE+JTy+Cp/okhWq5TmDqmOb\r\nHsoc+s//eJ4sm3QcTSDnE8n4yqrWjSdVUs8=\r\n=pzs9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.5_1671821246521_0.20499775546941046"},"_hasShrinkwrap":false},"1.6.0-beta.6":{"version":"1.6.0-beta.6","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","browser":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"ccee4a6b5548eef70e18d3d2f3c10465b4a11f88","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.6","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-hVinkZXZtiKuvJvI9vtInCYIbniOeK5VgEIuK0pMP8N+5ONPpbk4Tu2po0dm2UoZ4e2nTXMdfhx5EgO92IHDjA==","shasum":"060637ed12a5e49b9ceee0ecf66e16fe0d3f80ab","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.6.tgz","fileCount":14,"unpackedSize":282619,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDOXZI7mnq09ML+tOAU4GIh+yGrervHx1bqXYB1lRR/8AiEAuLJgBKig3yFMuipQemBjMrabJmYEeYiM7v8N/seGkvc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpy8nACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr60xAAjseJpRNP5HaYBAsQ1N3FKI9e6XwgGX/Qj9PRiVkPuL8G5BME\r\nGzNwJ70B+h/o9/CDOFPOKvTHNbtMmirG0fcE1zrEIbSzi8GB8OhEj9MeJnSr\r\nK/F1JySf5FnNQBs+B0FKP4HejoED2hr3lLrkvLE+wB0CArh/fqMQmIbBB78L\r\nenLbnMi5B/vT3ZilztgJh1uzbAcDB9d0NZOycg34rVhg9d+LOW5RV4Omz9dh\r\nr28Ts0AaZIMW3POz6jtbEeD32hvAbvP73k54bRrlbplfI4zylmCBHQI2si/e\r\ndbrlDfSK0JnM3fMVIVLc7NK3nSG2K6mpoYKa2SKFzNgxIfsqgBV1VZHJlE2g\r\nZ+b02rDJF7Aa6Pv1LVlCAJyIiCPJxxihX8jQMQvWyzimq7+o53qyLhJdxZ5J\r\nIEVxytPR6HnJP50iCdxIvAVn5gkNQkgo1XJPAszRE4m0CB2oi/HpPq9bAsQZ\r\nqaioXVy1qWajtEkj2E57VvjEqxhWliPhzdnD0MEVlJriXe702KfhpjbTG8lC\r\nupBj2hMNDfy2stvNZzvpa/oVH7ITzL5cA8rQhDRk1tNvq1SzeLoCWsC+TiFF\r\nIetcgy62l6ijkPetTbSiDPy30BrdVOxd2Q0SwIdpnFoRcoMOKPs2L2JilByh\r\nuHlt6KkeLeuCsl71boZmK4pdZLqGxExKDNs=\r\n=K6G7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.6_1671900966846_0.9448797085817073"},"_hasShrinkwrap":false},"1.6.0-beta.7":{"version":"1.6.0-beta.7","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"7bfb6c81fd762eb3907c3bbc638deb11eb98c9d3","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.7","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-TZpl5xWK1BBt6jnjtS6A55aIKdTVR1l512mUP1lTKaMWmYJrLBmwUGwFLwL7qE153sr0GUYkgNs3dOdRjSeQbQ==","shasum":"4cbe3c285fb6695af71b26e6fa75530410512a1f","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.7.tgz","fileCount":14,"unpackedSize":282471,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAlWpWsffTFutSehOnAZ9kzskArsPGThg5GTwvstGhAQAiANoGPPZGjg6OFPvBF/2EveaOujTgF/H2AnHccC2YB3yw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpzLdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYxQ//YtnRzvFsCghbxBd9Wu2kPcUOzFirAZtEq8SmLIf67Bq6in1J\r\n7biTD9PCeT1j4dEJyIFRYrwSYqMJG/h55lIVau2KKoI98V4J9T3cGOzj7Fc5\r\nP9s0z6gpsX5vNNEqTdhKEVwz2+wMpIgf9TCPZsskkzxiTqtcziJL7u9dXAHd\r\nZsYO2p3hO4NHMeiK0lA3VD9/6nFMFEXJnO5y9A9Q5LVFPU/Mzi5LJ5JiSNG4\r\nWDfuMdqvQ3TWzIVXSMDhMVaTzHN01jiqT2c9MmkKxpVweasKy8B3tQoeCBFT\r\nqfgU1zb5Ml4tJKalH9Z5Xz+q3XvnJMuV5atWuWaYHAMB/dsjZvQ4UeHoOjtL\r\nVCqv24xffBsDXZX3dsQBmS7NzQLXiGtbza3jdYV51BKMxkT9SvahMtlUkFjU\r\nh5jq5lYTi2MGF79xoTIr6yW4u8PDWbJFnc47mA7NSqG/OoHGPykjiaYlCGct\r\nHRsq75GKJa6JM4OhdYQ1CG3eDCBVintg6bKoErRoRqqsdCKnnIII7NPydCLi\r\nfvE8vVE4/aHLJI5jzHk1Xdfw6bThMk7ZMLmQ11OreW7abfVgImlEsYoshDfA\r\nLOyHrbeQ8Ga+789fjRPg4NIYblJN49eCAtyGlP4hCm36i8Pbs2aAbaks/IAf\r\nYkdGilg/VqcRLEYcQ7mERK+iK8cEwOf4/0w=\r\n=CBcf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.7_1671901917117_0.25169039040165453"},"_hasShrinkwrap":false},"1.6.0-beta.8":{"version":"1.6.0-beta.8","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","browser":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\n** Note: This support is in progress and was landed in [1.5.0](https://www.npmjs.com/package/tinycolor2/v/1.5.0) but has been temporarily reverted in 1.5.1 due to a bug report: https://github.com/bgrins/TinyColor/issues/249 **\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","readmeFilename":"README.md","gitHead":"0a6f674f38f6af94f5b6c21638792b1c810f3abd","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.8","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-6xEgOywufzLb7spBlmr9J+ZacoZnqjlS3+IwGeyfvy0E7oEAs0KBn985jv9xHzhxge0kRKlzYF2W8IMRG3Z9LA==","shasum":"dbd4ec1ffe1de93bc645f03f4d79c3137f7e77cb","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.8.tgz","fileCount":14,"unpackedSize":284246,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDUw436c5BsOh4Kzt9QUV6lH/IBZRzNwPFbSII+MERMMAiEA4gw0KDgE6INMv1bSOnG8EgFVl1sn4YZvuNEQQ9OPaXg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjq8KwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouixAAk9+DMiy7YRUVfJESYHbZcixX5fOYx83J198ipZBJJF7KAYFL\r\nDleeKVAYSPF8NPJhKrcXFXb9Gf3aKl00zPX6LVIBqQ0/ye+VuxNVQVb4N5d9\r\negyaavy4VERuUA/YyXoN7b3VTRZSfzWfjOfihe8KhGfzRTReEvmxm3EWhE/E\r\n7wgTe1Aje5Frh9Q5gOLJ+epI6TjIEMNZKwQM/zHDZFwko6vSIdqmT0PDI3aG\r\nhpsikoa5G10AXREW2RbmwA6r9osExr0YTq/kTEhucpCn/8qdh6nsC9xyty9C\r\nt/6k59CUI7sYCxcqPqq+S2cj5jkEwGW8zUdFmMBfEoD2VtV+xrtPxAjUNgpI\r\neO4v9nlDg0qc6kJMT579DHR/bCVZGEtzBeCQcayKByj++7MvlGP784KSipzJ\r\n/IGx82A/RfY8fmAph3SEi40ZbypMWyxH23MihytHlBbDKrdgyu6w8FmMNXl5\r\nk9Izr2eUE9tM8GHJCSQxZkjSM+FlBiLBNQ6rO98okJCOWvs28asFnsDxIVOg\r\nIAL164PZY9MN69p1I3mdbl7X6vz1Ppt0dLAm29HSuwRGrbVXyS7drwEE2ccy\r\nunRd7qqin6RsFYxxI6h9YyRnjBAySwB8VffZNhjWWxjc6oVPNqCRFxUSDWl6\r\nH7nhQQzs5amkLxk+Y9elAgi06+y+3QnnpJ4=\r\n=LHZD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.8_1672200879853_0.12309288036572408"},"_hasShrinkwrap":false},"1.5.2":{"version":"1.5.2","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","browser":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"gitHead":"cde0cfe6757fff491591d612ffa8dd8672db1b6c","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.5.2","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-h80m9GPFGbcLzZByXlNSEhp1gf8Dy+VX/2JCGUZsWLo7lV1mnE/XlxGYgRBoMLJh1lIDXP0EMC4RPTjlRaV+Bg==","shasum":"7d30b4584d8b7d62b9a94dacc505614a6516a95f","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.5.2.tgz","fileCount":14,"unpackedSize":284011,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCIstL9KejIbihv8wcHYWvo/R2w8C3MlnCI+6A4Thk3sAIgYCfYzWkh68ZsR8xWFhHSExWeRG6qfHFkMhTMrvqsA/s="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjs1Z7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9GQ//fjbEyjchubSK/lH5IjxAUxBWAgY5Xt4hAeHG5WSQqv6sCpvx\r\nzX2finsuCcjQ8QwWDOLCb6QAc2TfiKemKKddddWzHeUyxWvhIjGKiBclYqCF\r\nnEo/yXS4bjfCci/EjqB+8lZ5ZsLQDruNpF3V1Adq8dNu0WghxfxulPK7XM2E\r\nhMkB0fv0SWy+4B0pKTcleG/8hiI0HWlrAx2BYZA3gju3DfLvYHpTwP8LieX4\r\nIPY/IWBmAqSo8eStNak/AyatPXRy3K/0sPgjUs0qapnQrnr9HvgMvTmlOJN4\r\nabM8YepcOOO5Uwy4A3WgVMWTh3XDCyhbC9IPoCq6Hb9KgRrtK76V+AoFr1Z5\r\nq4voAA3AisDz5Kmjtty62ecarchGbkQkh07L8nw+KQOFda96HJIB7DwIUkTx\r\nelozeV/rRegIijZQ7LKw0PZ8FRfgXg7gM2ocVLQRQ8Pz6kBwmtvqez/I5n+O\r\nl3J8dhSuzsxQj7GhQPIIbr9/lk6R52HuYnvo5BVzNtK0ueSN65iy/rLN/c5t\r\nZ12m6cjbhjZKLzvFsR3MgRzg27BK2b+t2JiHchpDCun8AcwcwavWbUEiHYGc\r\n7eF1X5WjzU6ZToo8pzxZoby3yxs2I1j1fBCQr7W856YqjApijqvXwf9bLGFX\r\nGCxAhRC5TdxTy6Ex0zZJLEMazoEUoJJvjuQ=\r\n=hLPT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.5.2_1672697467123_0.6854849286783951"},"_hasShrinkwrap":false},"1.6.0-beta.9":{"version":"1.6.0-beta.9","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","browser":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"gitHead":"842f212c4728d891e7707b71bc273f758894fe56","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0-beta.9","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-NIjd3zHa7zkvMRiMe1CWLE986ic8+Kx5ImON4VYIhXg8Q/MY8QrzRVarnqvUGrss2gD9BmPnimsyf+oeJIWPJA==","shasum":"b29d6d149a1c03f47b5a06e461e9a1f31cc06332","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0-beta.9.tgz","fileCount":14,"unpackedSize":284862,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGBgL8Nobk7BFOdSyX3Wn48kh2f2tJn6eagT2n7iSNdQIhAKi6bwZamT/Z86HZr57avhmRqSMbbErbW4zBFkAn2Shj"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3ZlBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohYQ/5ALQntdzCf+THa2eQNZox1HDP6V/2Rgb06E2WUUNc9l4NA5xy\r\n3iXawBb+22vd0oHSETZRhTiO2tzXOWYr+X7NoyBwVMKeUlunGfKL85lum64W\r\nE8JTLiTqRK+x3m1CpSPqxdCRQtGvnk26NKOgV7QQ6S4mZCLHOnXWP5petEVS\r\nwPeK3aFrLbc33ZiVagc75jcQ3CnxDXcARJGPzMkQ7R55/N86PqjfLuzd4I6B\r\n6UK8XgLaKlUXIAyxluBF52g2RxDgJ5AMgIjqoPyMISpTrmH265BlceM17gvR\r\nSDiS4BlhCpjve8a2NYV250fzYuwATDpEgGG5NI0dkYuekzLGVYCeDuBt7zQ9\r\nev0KKVOljCsoMeD8soy8OEsA/XXiBRYZoKnUIkmIbQXhDYBanpXix+566vJa\r\n0Us6Tu6UlRUSSmiCuU/DcovWsg3Zv15j9DgQiYMNkaQOP6+nEfYtfYWjQm9I\r\nxtakkxliLhLdaTp71TQKTKI4LSlEFLzfOPkmmCk5/xsFEqrDHSCAxrgwmwTJ\r\nKOccqnwEpbfWVrAutEOheo39Xwjhx+8Tnx0biVd4mR2xAElad2NcoC8nYEA2\r\nGYuV9Yy4Qh2zf/CWdJcv8+B+8+FjWn9fy6vSFyXYSRdr8suAKSTWGaaLhKSw\r\nDvmUrAWzcqOrlCsg5g8qRSTlVGaGyV2QrPk=\r\n=+6Jv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0-beta.9_1675467073272_0.22699123336752725"},"_hasShrinkwrap":false},"1.6.0":{"version":"1.6.0","name":"tinycolor2","description":"Fast Color Parsing and Manipulation","url":"http://bgrins.github.com/TinyColor","license":"MIT","repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"keywords":["color","parser","tinycolor"],"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"bugs":{"url":"https://github.com/bgrins/TinyColor/issues"},"module":"./esm/tinycolor.js","main":"./cjs/tinycolor.js","browser":"./cjs/tinycolor.js","exports":{".":{"import":"./esm/tinycolor.js","require":"./cjs/tinycolor.js"}},"scripts":{"test":"node cjs/test.js && node esm/test.js"},"devDependencies":{"@deno/shim-deno-test":"^0.4.0"},"gitHead":"a93228a6782bfe9a6154da14f5a7ece3ad9fb6c4","homepage":"https://github.com/bgrins/TinyColor#readme","_id":"tinycolor2@1.6.0","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==","shasum":"f98007460169b0263b97072c5ae92484ce02d09e","tarball":"https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz","fileCount":14,"unpackedSize":284855,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5OG9FzjJDusB52R83kfGssvuhmTK8qwlneY+fgokk9gIgMPkBOGcjchl4+T77hmS8HqUDeha/1BsYaF7eV9fvNeo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3ZmzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/GRAAiU81X8yOuh1+XTC77htssN6HglFLlrX7PHVwg9+NoDyvEaxr\r\nZvGW0FnosukembzrvKYzVBq1YWjiIf2RY4Vl06QcmE91Lc7aO5oxgZDOWq88\r\n8s6lVfBKt3hvTUSIxyP8cq37g1dmt7mpkpjIDVZPPLPLHStpUZog9mGqZSUC\r\n8/tUp3cFKXoqz6ZnZlcqm7DTdO8TFNBHTbXzCDSUs2YqMuZjYHc83PATHDT2\r\ndt6nskP0rEoiZ7r0SLcA+uhJdyS54YVaizw+A/8AqpxusNAT32GiJjMVOUrQ\r\nQpLqvHICEByQyvVEuFcbGLyd1bjLeqAW6ceC0+4uPwpnvpeGrmfgsntmYSgB\r\nv2NM3zatHjt+oGC5KL1t8BZmf+iOIXqw3lCiXco0n8lIsrmM/AdpeSeXPvvy\r\nYwr2kFhpDAidLhBvvRYwtJGFuC2UivR9/UEqFqUgYCHDQoXR1sBbCKY9EB5z\r\n2fGFWEsNLaTc2hJ2b6TcFH55EJWtwhxGT3Ff+vpQ2EQBz8pEg37OZKDdSkiT\r\nOzeMhwtTMszbM+XYeBkDC1pDxgLY//bbPJ5CceHQ3Aui2dsc9MKv+A+AUPoH\r\nXjx9qtT0NyPIsXnZjRjrmOz9sA+MmxvXxTEy0/2to1uBGZqOKr7TS5iiR0UB\r\nFKDi0GaEjlCGHOfW6/YcHdy7Cw1zcrCeHdM=\r\n=e9cA\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bgrins","email":"briangrinstead@gmail.com"},"directories":{},"maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tinycolor2_1.6.0_1675467187558_0.6894191962871767"},"_hasShrinkwrap":false}},"readme":"# TinyColor\n\n## JavaScript color tooling\n\nTinyColor is a small, fast library for color manipulation and conversion in JavaScript.  It allows many forms of input, while providing color conversions and other color utility functions.  It has no dependencies.\n\n## Including in node\n\n`tinycolor` can be installed from npm:\n\n    npm install tinycolor2\n\nThen it can be used in your script like so:\n\n```js\nvar tinycolor = require(\"tinycolor2\");\nvar color = tinycolor(\"red\");\n```\n\nOr in a module like so:\n\n```js\nimport tinycolor from \"tinycolor2\";\nvar color = tinycolor(\"red\");\n```\n\n## Including in a browser\n\nThe package can be bundled from npm, but if you prefer to download it locally you have two choices:\n\n### ESM\n\nIt can be used as a module by downloading [npm/esm/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/esm/tinycolor.js) or using https://esm.sh/tinycolor2.\n\n```html\n<script type='module'>\nimport tinycolor from \"https://esm.sh/tinycolor2\";\nvar color = tinycolor(\"red\");\n</script>\n```\n\n### UMD\n\nYou can use it directly in a script tag by downloading the UMD file from [npm/cjs/tinycolor.js](https://github.com/bgrins/TinyColor/blob/master/npm/cjs/tinycolor.js):\n\n```html\n<script type='text/javascript' src='tinycolor.js'></script>\n<script type='text/javascript'>\nvar color = tinycolor(\"red\");\n</script>\n```\n\n## Usage\n\nCall `tinycolor(input)` or `new tinycolor(input)`, and you will have an object with the following properties.  See Accepted String Input and Accepted Object Input below for more information about what is accepted.\n\n## Accepted String Input\n\nThe string parsing is very permissive.  It is meant to make typing a color as input as easy as possible.  All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).\n\nHSL and HSV both require either 0%-100% or 0-1 for the `S`/`L`/`V` properties.  The `H` (hue) can have values between 0%-100% or 0-360.\n\nRGB input requires either 0-255 or 0%-100%.\n\nIf you call `tinycolor.fromRatio`, RGB and Hue input can also accept 0-1.\n\nHere are some examples of string input:\n\n### Hex, 8-digit (RGBA) Hex\n```js\ntinycolor(\"#000\");\ntinycolor(\"000\");\ntinycolor(\"#369C\");\ntinycolor(\"369C\");\ntinycolor(\"#f0f0f6\");\ntinycolor(\"f0f0f6\");\ntinycolor(\"#f0f0f688\");\ntinycolor(\"f0f0f688\");\n```\n### RGB, RGBA\n```js\ntinycolor(\"rgb (255, 0, 0)\");\ntinycolor(\"rgb 255 0 0\");\ntinycolor(\"rgba (255, 0, 0, .5)\");\ntinycolor({ r: 255, g: 0, b: 0 });\ntinycolor.fromRatio({ r: 1, g: 0, b: 0 });\ntinycolor.fromRatio({ r: .5, g: .5, b: .5 });\n```\n### HSL, HSLA\n```js\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsla(0, 100%, 50%, .5)\");\ntinycolor(\"hsl(0, 100%, 50%)\");\ntinycolor(\"hsl 0 1.0 0.5\");\ntinycolor({ h: 0, s: 1, l: .5 });\ntinycolor.fromRatio({ h: 1, s: 0, l: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, l: .5 });\n```\n### HSV, HSVA\n```js\ntinycolor(\"hsv(0, 100%, 100%)\");\ntinycolor(\"hsva(0, 100%, 100%, .5)\");\ntinycolor(\"hsv (0 100% 100%)\");\ntinycolor(\"hsv 0 1 1\");\ntinycolor({ h: 0, s: 100, v: 100 });\ntinycolor.fromRatio({ h: 1, s: 0, v: 0 });\ntinycolor.fromRatio({ h: .5, s: .5, v: .5 });\n```\n### Named\n\nCase insenstive names are accepted, using the [list of colors in the CSS spec](https://www.w3.org/TR/css-color-4/#named-colors).\n\n```js\ntinycolor(\"RED\");\ntinycolor(\"blanchedalmond\");\ntinycolor(\"darkblue\");\n```\n### Accepted Object Input\n\nIf you are calling this from code, you may want to use object input.  Here are some examples of the different types of accepted object inputs:\n\n    { r: 255, g: 0, b: 0 }\n    { r: 255, g: 0, b: 0, a: .5 }\n    { h: 0, s: 100, l: 50 }\n    { h: 0, s: 100, v: 100 }\n\n## Methods\n\n### getFormat\n\nReturns the format used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getFormat(); // \"name\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getFormat(); // \"rgb\"\n```\n\n### getOriginalInput\n\nReturns the input passed into the constructor used to create the tinycolor instance\n```js\nvar color = tinycolor(\"red\");\ncolor.getOriginalInput(); // \"red\"\ncolor = tinycolor({r:255, g:255, b:255});\ncolor.getOriginalInput(); // \"{r: 255, g: 255, b: 255}\"\n```\n\n### isValid\n\nReturn a boolean indicating whether the color was successfully parsed.  Note: if the color is not valid then it will act like `black` when being used with other methods.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.isValid(); // true\ncolor1.toHexString(); // \"#ff0000\"\n\nvar color2 = tinycolor(\"not a color\");\ncolor2.isValid(); // false\ncolor2.toString(); // \"#000000\"\n```\n### getBrightness\n\nReturns the perceived brightness of a color, from `0-255`, as defined by [Web Content Accessibility Guidelines (Version 1.0)](http://www.w3.org/TR/AERT#color-contrast).\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getBrightness(); // 255\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getBrightness(); // 0\n```\n### isLight\n\nReturn a boolean indicating whether the color's perceived brightness is light.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isLight(); // true\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isLight(); // false\n```\n### isDark\n\nReturn a boolean indicating whether the color's perceived brightness is dark.\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.isDark(); // false\n\nvar color2 = tinycolor(\"#000\");\ncolor2.isDark(); // true\n```\n### getLuminance\n\nReturns the perceived luminance of a color, from `0-1` as defined by [Web Content Accessibility Guidelines (Version 2.0).](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef)\n```js\nvar color1 = tinycolor(\"#fff\");\ncolor1.getLuminance(); // 1\n\nvar color2 = tinycolor(\"#000\");\ncolor2.getLuminance(); // 0\n```\n### getAlpha\n\nReturns the alpha value of a color, from `0-1`.\n```js\nvar color1 = tinycolor(\"rgba(255, 0, 0, .5)\");\ncolor1.getAlpha(); // 0.5\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.getAlpha(); // 1\n\nvar color3 = tinycolor(\"transparent\");\ncolor3.getAlpha(); // 0\n```\n### setAlpha\n\nSets the alpha value on a current color.  Accepted range is in between `0-1`.\n```js\nvar color = tinycolor(\"red\");\ncolor.getAlpha(); // 1\ncolor.setAlpha(.5);\ncolor.getAlpha(); // .5\ncolor.toRgbString(); // \"rgba(255, 0, 0, .5)\"\n```\n### String Representations\n\nThe following methods will return a property for the `alpha` value, which can be ignored: `toHsv`, `toHsl`, `toRgb`\n\n### toHsv\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsv(); // { h: 0, s: 1, v: 1, a: 1 }\n```\n### toHsvString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsvString(); // \"hsv(0, 100%, 100%)\"\ncolor.setAlpha(0.5);\ncolor.toHsvString(); // \"hsva(0, 100%, 100%, 0.5)\"\n```\n### toHsl\n```js\nvar color = tinycolor(\"red\");\ncolor.toHsl(); // { h: 0, s: 1, l: 0.5, a: 1 }\n```\n### toHslString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHslString(); // \"hsl(0, 100%, 50%)\"\ncolor.setAlpha(0.5);\ncolor.toHslString(); // \"hsla(0, 100%, 50%, 0.5)\"\n```\n### toHex\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex(); // \"ff0000\"\n```\n### toHexString\n```js\nvar color = tinycolor(\"red\");\ncolor.toHexString(); // \"#ff0000\"\n```\n### toHex8\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8(); // \"ff0000ff\"\n```\n### toHex8String\n```js\nvar color = tinycolor(\"red\");\ncolor.toHex8String(); // \"#ff0000ff\"\n```\n### toRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgb(); // { r: 255, g: 0, b: 0, a: 1 }\n```\n### toRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toRgbString(); // \"rgb(255, 0, 0)\"\ncolor.setAlpha(0.5);\ncolor.toRgbString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### toPercentageRgb\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgb() // { r: \"100%\", g: \"0%\", b: \"0%\", a: 1 }\n```\n### toPercentageRgbString\n```js\nvar color = tinycolor(\"red\");\ncolor.toPercentageRgbString(); // \"rgb(100%, 0%, 0%)\"\ncolor.setAlpha(0.5);\ncolor.toPercentageRgbString(); // \"rgba(100%, 0%, 0%, 0.5)\"\n```\n### toName\n```js\nvar color = tinycolor(\"red\");\ncolor.toName(); // \"red\"\n```\n### toFilter\n```\nvar color = tinycolor(\"red\");\ncolor.toFilter(); // \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffff0000,endColorstr=#ffff0000)\"\n```\n### toString\n\nPrint to a string, depending on the input format.  You can also override this by passing one of `\"rgb\", \"prgb\", \"hex6\", \"hex3\", \"hex8\", \"name\", \"hsl\", \"hsv\"` into the function.\n```js\nvar color1 = tinycolor(\"red\");\ncolor1.toString(); // \"red\"\ncolor1.toString(\"hsv\"); // \"hsv(0, 100%, 100%)\"\n\nvar color2 = tinycolor(\"rgb(255, 0, 0)\");\ncolor2.toString(); // \"rgb(255, 0, 0)\"\ncolor2.setAlpha(.5);\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n### Color Modification\n\nThese methods manipulate the current color, and return it for chaining.  For instance:\n```js\ntinycolor(\"red\").lighten().desaturate().toHexString() // \"#f53d3d\"\n```\n### lighten\n\n`lighten: function(amount = 10) -> TinyColor`.  Lighten the color a given amount, from 0 to 100.  Providing 100 will always return white.\n```js\ntinycolor(\"#f00\").lighten().toString(); // \"#ff3333\"\ntinycolor(\"#f00\").lighten(100).toString(); // \"#ffffff\"\n```\n### brighten\n\n`brighten: function(amount = 10) -> TinyColor`.  Brighten the color a given amount, from 0 to 100.\n```js\ntinycolor(\"#f00\").brighten().toString(); // \"#ff1919\"\n```\n### darken\n\n`darken: function(amount = 10) -> TinyColor`.  Darken the color a given amount, from 0 to 100.  Providing 100 will always return black.\n```js\ntinycolor(\"#f00\").darken().toString(); // \"#cc0000\"\ntinycolor(\"#f00\").darken(100).toString(); // \"#000000\"\n```\n### desaturate\n\n`desaturate: function(amount = 10) -> TinyColor`.  Desaturate the color a given amount, from 0 to 100.  Providing 100 will is the same as calling `greyscale`.\n```js\ntinycolor(\"#f00\").desaturate().toString(); // \"#f20d0d\"\ntinycolor(\"#f00\").desaturate(100).toString(); // \"#808080\"\n```\n### saturate\n\n`saturate: function(amount = 10) -> TinyColor`.  Saturate the color a given amount, from 0 to 100.\n```js\ntinycolor(\"hsl(0, 10%, 50%)\").saturate().toString(); // \"hsl(0, 20%, 50%)\"\n```\n### greyscale\n\n`greyscale: function() -> TinyColor`.  Completely desaturates a color into greyscale.  Same as calling `desaturate(100)`.\n```js\ntinycolor(\"#f00\").greyscale().toString(); // \"#808080\"\n```\n### spin\n\n`spin: function(amount = 0) -> TinyColor`.  Spin the hue a given amount, from -360 to 360.  Calling with 0, 360, or -360 will do nothing (since it sets the hue back to what it was before).\n```js\ntinycolor(\"#f00\").spin(180).toString(); // \"#00ffff\"\ntinycolor(\"#f00\").spin(-90).toString(); // \"#7f00ff\"\ntinycolor(\"#f00\").spin(90).toString(); // \"#80ff00\"\n\n// spin(0) and spin(360) do nothing\ntinycolor(\"#f00\").spin(0).toString(); // \"#ff0000\"\ntinycolor(\"#f00\").spin(360).toString(); // \"#ff0000\"\n```\n### Color Combinations\n\nCombination functions return an array of TinyColor objects unless otherwise noted.\n\n### analogous\n\n`analogous: function(, results = 6, slices = 30) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").analogous();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ff0066\", \"#ff0033\", \"#ff0000\", \"#ff3300\", \"#ff6600\" ]\n```\n### monochromatic\n\n`monochromatic: function(, results = 6) -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").monochromatic();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#2a0000\", \"#550000\", \"#800000\", \"#aa0000\", \"#d40000\" ]\n```\n### splitcomplement\n\n`splitcomplement: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").splitcomplement();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#ccff00\", \"#0066ff\" ]\n```\n### triad\n\n`triad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").triad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#00ff00\", \"#0000ff\" ]\n```\n### tetrad\n\n`tetrad: function() -> array<TinyColor>`.\n```js\nvar colors = tinycolor(\"#f00\").tetrad();\n\ncolors.map(function(t) { return t.toHexString(); }); // [ \"#ff0000\", \"#80ff00\", \"#00ffff\", \"#7f00ff\" ]\n\n```\n### complement\n\n`complement: function() -> TinyColor`.\n```js\ntinycolor(\"#f00\").complement().toHexString(); // \"#00ffff\"\n```\n## Color Utilities\n```js\ntinycolor.equals(color1, color2)\ntinycolor.mix(color1, color2, amount = 50)\n```\n### random\n\nReturns a random color.\n```js\nvar color = tinycolor.random();\ncolor.toRgb(); // \"{r: 145, g: 40, b: 198, a: 1}\"\n```\n\n### Readability\n\nTinyColor assesses readability based on the [Web Content Accessibility Guidelines (Version 2.0)](http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef).\n\n#### readability\n\n`readability: function(TinyColor, TinyColor) -> Object`.\nReturns the contrast ratio between two colors.\n```js\ntinycolor.readability(\"#000\", \"#000\"); // 1\ntinycolor.readability(\"#000\", \"#111\"); // 1.1121078324840545\ntinycolor.readability(\"#000\", \"#fff\"); // 21\n```\nUse the values in your own calculations, or use one of the convenience functions below.\n\n#### isReadable\n\n`isReadable: function(TinyColor, TinyColor, Object) -> Boolean`.  Ensure that foreground and background color combinations meet WCAG guidelines. `Object` is optional, defaulting to `{level: \"AA\",size: \"small\"}`.  `level` can be `\"AA\"` or \"AAA\" and `size` can be `\"small\"` or `\"large\"`.\n\nHere are links to read more about the [AA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) and [AAA](http://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html) requirements.\n```js\ntinycolor.isReadable(\"#000\", \"#111\", {}); // false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"small\"}); //false\ntinycolor.isReadable(\"#ff0088\", \"#5c1a72\",{level:\"AA\",size:\"large\"}), //true\n```\n#### mostReadable\n\n`mostReadable: function(TinyColor, [TinyColor, Tinycolor ...], Object) -> Boolean`.\nGiven a base color and a list of possible foreground or background colors for that base, returns the most readable color.\nIf none of the colors in the list is readable, `mostReadable` will return the better of black or white if `includeFallbackColors:true`.\n```js\ntinycolor.mostReadable(\"#000\", [\"#f00\", \"#0f0\", \"#00f\"]).toHexString(); // \"#00ff00\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString();  // \"#ffffff\"\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString()   // \"#2e0c3a\",\ntinycolor.mostReadable(\"#ff0088\", [\"#2e0c3a\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString()   // \"#000000\",\n```\nSee [index.html](https://github.com/bgrins/TinyColor/blob/master/index.html) in the project for a demo.\n\n## Common operations\n\n### clone\n\n`clone: function() -> TinyColor`.\nInstantiate a new TinyColor object with the same color.  Any changes to the new one won't affect the old one.\n```js\nvar color1 = tinycolor(\"#F00\");\nvar color2 = color1.clone();\ncolor2.setAlpha(.5);\n\ncolor1.toString(); // \"#ff0000\"\ncolor2.toString(); // \"rgba(255, 0, 0, 0.5)\"\n```\n","maintainers":[{"name":"bgrins","email":"briangrinstead@gmail.com"}],"time":{"modified":"2023-07-08T23:44:53.211Z","created":"2012-09-12T18:40:46.654Z","0.9.9":"2012-09-12T18:40:47.750Z","0.9.16":"2014-01-08T22:45:35.239Z","0.9.17":"2014-02-13T21:18:14.416Z","0.9.18":"2014-04-26T19:57:49.953Z","0.10.0":"2014-04-30T13:13:42.027Z","1.0.0":"2014-07-06T20:30:19.444Z","1.1.0":"2014-11-30T18:29:03.429Z","1.1.1":"2014-12-08T19:26:12.415Z","1.1.2":"2015-03-16T20:34:59.746Z","1.2.1":"2015-11-28T01:40:03.593Z","1.3.0":"2015-11-28T02:51:24.324Z","1.4.0":"2016-07-08T01:39:29.518Z","1.4.1":"2016-07-08T01:48:24.139Z","1.4.2":"2020-09-25T17:52:05.894Z","1.5.0":"2022-12-21T22:39:28.276Z","1.5.1":"2022-12-22T05:34:15.211Z","1.6.0-beta.1":"2022-12-22T21:28:01.935Z","1.6.0-beta.2":"2022-12-22T23:57:53.694Z","1.6.0-beta.3":"2022-12-23T18:29:30.622Z","1.6.0-beta.4":"2022-12-23T18:45:14.533Z","1.6.0-beta.5":"2022-12-23T18:47:26.712Z","1.6.0-beta.6":"2022-12-24T16:56:07.007Z","1.6.0-beta.7":"2022-12-24T17:11:57.284Z","1.6.0-beta.8":"2022-12-28T04:14:40.043Z","1.5.2":"2023-01-02T22:11:07.375Z","1.6.0-beta.9":"2023-02-03T23:31:13.432Z","1.6.0":"2023-02-03T23:33:07.774Z"},"author":{"name":"Brian Grinstead","email":"briangrinstead@gmail.com","url":"http://briangrinstead.com"},"repository":{"type":"git","url":"git+https://github.com/bgrins/TinyColor.git"},"readmeFilename":"README.md","keywords":["color","parser","tinycolor"],"users":{"greggman":true,"oncletom":true,"theoryofnekomata":true,"goliatone":true,"dazld":true,"alexxnica":true,"kakaman":true,"d-band":true,"itcorp":true,"hugojosefson":true,"errec":true,"syndesi":true,"flitrue":true},"license":"MIT","homepage":"https://github.com/bgrins/TinyColor#readme","bugs":{"url":"https://github.com/bgrins/TinyColor/issues"}}