{"id":21997792,"url":"https://github.com/thebespokepixel/es-tinycolor","last_synced_at":"2025-09-09T23:13:08.880Z","repository":{"id":11284140,"uuid":"69038096","full_name":"thebespokepixel/es-tinycolor","owner":"thebespokepixel","description":"Fast Color Parsing and Manipulation in es2017, based on TinyColor2","archived":false,"fork":false,"pushed_at":"2023-10-06T11:36:41.000Z","size":10739,"stargazers_count":10,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T08:58:56.727Z","etag":null,"topics":["color","hsl","hue","library","node-module","npm","rgb","tinycolor"],"latest_commit_sha":null,"homepage":"https://thebespokepixel.github.io/es-tinycolor/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thebespokepixel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-23T15:37:27.000Z","updated_at":"2024-09-24T12:52:12.000Z","dependencies_parsed_at":"2024-06-18T18:42:15.857Z","dependency_job_id":"0900e5c3-2603-4aee-915e-23f37bf0b79a","html_url":"https://github.com/thebespokepixel/es-tinycolor","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/thebespokepixel/es-tinycolor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebespokepixel%2Fes-tinycolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebespokepixel%2Fes-tinycolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebespokepixel%2Fes-tinycolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebespokepixel%2Fes-tinycolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thebespokepixel","download_url":"https://codeload.github.com/thebespokepixel/es-tinycolor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebespokepixel%2Fes-tinycolor/sbom","scorecard":{"id":877977,"data":{"date":"2025-08-11","repo":{"name":"github.com/thebespokepixel/es-tinycolor","commit":"df109597fe213490e4b14b52ea70816cf85a9f80"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: license:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"39 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-mhxj-85r3-2x55","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-3xq5-wjfh-ppjc","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T06:48:27.381Z","repository_id":11284140,"created_at":"2025-08-24T06:48:27.381Z","updated_at":"2025-08-24T06:48:27.381Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273687828,"owners_count":25150186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["color","hsl","hue","library","node-module","npm","rgb","tinycolor"],"created_at":"2024-11-29T22:18:06.600Z","updated_at":"2025-09-09T23:13:08.849Z","avatar_url":"https://github.com/thebespokepixel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ES-TinyColor\n\n\u003e JavaScript color tooling. An ES2017 port of Brian Grinstead's [TinyColor][1] for Node \u003e v8.0\n\n##### Publishing Status\n\n[![npm](https://img.shields.io/npm/v/@thebespokepixel/es-tinycolor?logo=npm \"npm\")](https://www.npmjs.com/package/@thebespokepixel/es-tinycolor \"npm\")\u0026#x20;[![Libraries.io](https://img.shields.io/librariesio/release/npm/@thebespokepixel/es-tinycolor/latest?\\\u0026logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICA8cGF0aCBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01Ljk5OTMxNDIyLDE1LjI3NyBMNiwyMyBDNiwyMy41NTIyODQ3IDUuNTUyMjg0NzUsMjQgNSwyNCBMMiwyNCBDMS40NDc3MTUyNSwyNCAxLDIzLjU1MjI4NDcgMSwyMyBMMC45OTkzMTQyMjIsMTkuMTg0IEw1Ljk5OTMxNDIyLDE1LjI3NyBaIE0xNC40OTkzMTQyLDguNjM2IEwxNC41LDIzIEMxNC41LDIzLjU1MjI4NDcgMTQuMDUyMjg0NywyNCAxMy41LDI0IEwxMC41LDI0IEM5Ljk0NzcxNTI1LDI0IDkuNSwyMy41NTIyODQ3IDkuNSwyMyBMOS40OTkzMTQyMiwxMi41NDMgTDE0LjQ5OTMxNDIsOC42MzYgWiBNMTcuOTk5MzE0Miw4LjMzNCBMMjIuOTk5MzE0MiwxMi4xMDIgTDIzLDIzIEMyMywyMy41NTIyODQ3IDIyLjU1MjI4NDcsMjQgMjIsMjQgTDE5LDI0IEMxOC40NDc3MTUzLDI0IDE4LDIzLjU1MjI4NDcgMTgsMjMgTDE3Ljk5OTMxNDIsOC4zMzQgWiBNNSwwIEM1LjU1MjI4NDc1LDAgNiwwLjQ0NzcxNTI1IDYsMSBMNS45OTkzMTQyMiwxMS40NzEgTDAuOTk5MzE0MjIyLDE1LjM3OCBMMSwxIEMxLDAuNDQ3NzE1MjUgMS40NDc3MTUyNSwwIDIsMCBMNSwwIFogTTEzLjUsMCBDMTQuMDUyMjg0NywwIDE0LjUsMC40NDc3MTUyNSAxNC41LDEgTDE0LjQ5OTMxNDIsNC44MzEgTDkuNDk5MzE0MjIsOC43MzcgTDkuNSwxIEM5LjUsMC40NDc3MTUyNSA5Ljk0NzcxNTI1LDAgMTAuNSwwIEwxMy41LDAgWiBNMjIsMCBDMjIuNTUyMjg0NywwIDIzLDAuNDQ3NzE1MjUgMjMsMSBMMjIuOTk5MzE0Miw4LjM0NyBMMTcuOTk5MzE0Miw0LjU3OSBMMTgsMSBDMTgsMC40NDc3MTUyNSAxOC40NDc3MTUzLDAgMTksMCBMMjIsMCBaIi8%2BCjwvc3ZnPgo%3D \"Libraries.io\")](https://libraries.io/github/thebespokepixel/es-tinycolor \"Libraries.io\")\u0026#x20;  \n[![Travis](https://img.shields.io/travis/com/thebespokepixel/es-tinycolor/master?logo=travis \"Travis\")](https://travis-ci.com/thebespokepixel/es-tinycolor \"Travis\")\u0026#x20;[![Rollup](https://img.shields.io/badge/es6-type%3A%20module%20%E2%9C%94-64CA39?\\\u0026logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDE0IDE0Ij4KICA8ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgPHBhdGggZmlsbD0iI0ZGMzMzMyIgZD0iTTEwLjkwNDI4MjQsMy4wMDkxMDY4MyBDMTEuMjM4NzA1NSwzLjU4MjgzNzEzIDExLjQyODU3MTQsNC4yNDQ4MzM2MyAxMS40Mjg1NzE0LDQuOTUwOTYzMjIgQzExLjQyODU3MTQsNi40MTc4NjM0IDEwLjYwODY5NTcsNy42OTU2MjE3MiA5LjM5MTgyNzM5LDguMzc2NTMyNCBDOS4zMDU1MjQ2OCw4LjQyNDg2ODY1IDkuMjczMTYxMTYsOC41MzIwNDkwNCA5LjMxODQ3MDA5LDguNjE4MjEzNjYgTDExLjQyODU3MTQsMTMgTDUuMjU4NjgyODEsMTMgTDIuMzM5Nzc3MjMsMTMgQzIuMTUyMTIzNDUsMTMgMiwxMi44NDgyNzU3IDIsMTIuNjUzODA0OCBMMiwxLjM0NjE5NTIyIEMyLDEuMTU0OTk2ODggMi4xNDgzMTU0MywxIDIuMzM5Nzc3MjMsMSBMNy42NjAyMjI3NywxIEM3LjcwMTU0MTQ5LDEgNy43NDExMzc2NCwxLjAwNzM1NTg4IDcuNzc3NzY2NTgsMS4wMjA5MDQyOSBDOS4wNjQ1MzgyOCwxLjE0NDU0MDA0IDEwLjE3MzM4ODQsMS44NTM4NTI5MSAxMC44MjIyOTQ5LDIuODcyNTA0MzggQzEwLjc5OTE5NTMsMi44NDQ4NDgwNiAxMC44NDQ0OTkxLDIuOTQ5MTc0NzYgMTAuOTA0MjgyNCwzLjAwOTEwNjgzIFoiLz4KICAgIDxwYXRoIGZpbGw9IiMwMDAwMDAiIGZpbGwtb3BhY2l0eT0iLjMxIiBkPSJNOC44NTcxNDI4NiwzLjU3MTQyODU3IEw2LjcxNDI4NTcxLDYuNTcxNDI4NTcgTDkuMjg1NzE0MjksNS4yODU3MTQyOSBDOS4yODU3MTQyOSw1LjI4NTcxNDI5IDkuNzE0Mjg1NzEsNC44NTcxNDI4NiA5LjI4NTcxNDI5LDQuNDI4NTcxNDMgQzkuMjg1NzE0MjksNCA4Ljg1NzE0Mjg2LDMuNTcxNDI4NTcgOC44NTcxNDI4NiwzLjU3MTQyODU3IFoiLz4KICAgIDxwYXRoIGZpbGw9IiNGQkIwNDAiIGQ9Ik0yLjg0Njc0NjAzLDEyLjk5NTg0OTUgQzMuMjY0OTIwNjIsMTIuOTk1ODQ5NSAzLjE4NTkzMDM0LDEyLjk0NjM2NjkgMy4zMTYxMTYzOCwxMi44NzM5MDU0IEMzLjYxODE3NTg3LDEyLjcwNTc3OTMgNS42ODk0NDA5OSw4LjcxMjc4NDU5IDcuNzE3NTU0NzYsNi44MjEzNjYwMiBDOS43NDU2Njg1Miw0LjkyOTk0NzQ2IDEwLjAwNDU3NjcsNS41NjA0MjAzMiA4Ljg4NDc5ODk1LDMuNTAyOTc3MjMgQzguODg0Nzk4OTUsMy41MDI5NzcyMyA5Ljc0NzgyNjA5LDUuMTQyMjA2NjUgOS4wMTQyNTMwMiw1LjI2ODMwMTIzIEM4LjQzODE4MjQxLDUuMzY3MDc1MzEgNy4xMTk5MDg0Nyw0LjEyMjk0MjIxIDcuNjExODMzOTMsMy4wMDQ5MDM2OCBDOC4wOTA4MTM5OSwxLjkxNDE4NTY0IDEwLjAxOTY3OTYsMi4xMjAxNDAxMSAxMC45MDY0NCwzLjAwOTEwNjgzIEMxMC44NzgzOTE2LDIuOTYyODcyMTUgMTAuODUwMzQzMiwyLjkxNjYzNzQ4IDEwLjgyMjI5NDksMi44NzI1MDQzOCBDMTAuMzA0NDc4NiwyLjI1MjUzOTQgOS41MDQwMjA5MiwxLjkwMzY3Nzc2IDguNzEwMDM1OTYsMS45MDM2Nzc3NiBDNy4xOTk3Mzg0OCwxLjkwMzY3Nzc2IDYuODIwMDA2NTQsMi40MjY5NzAyMyAzLjkyMDIzNTM3LDcuNjE5OTY0OTcgQzIuMzg3Nzk5MzQsMTAuMzY1NDA2NyAyLjAxMDgzMTkzLDExLjU3MzUwNzkgMi4wMDYyOTA2OSwxMi4xNjk4MTgyIEMyLDEyLjk5NTg0OTUgMi4wMDYyOTA2OSwxMi45OTU4NDk1IDIuODQ2NzQ2MDMsMTIuOTk1ODQ5NSBaIi8%2BCiAgPC9nPgo8L3N2Zz4K \"Rollup\")](https://github.com/rollup/rollup/wiki/pkg.module \"Rollup\")\u0026#x20;  \n\n\n##### Development Status\n\n[![Travis](https://img.shields.io/travis/com/thebespokepixel/es-tinycolor/develop?logo=travis \"Travis\")](https://travis-ci.com/thebespokepixel/es-tinycolor \"Travis\")\u0026#x20;[![Libraries.io](https://img.shields.io/librariesio/github/TheBespokePixel/es-tinycolor?\\\u0026logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij4KICA8cGF0aCBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01Ljk5OTMxNDIyLDE1LjI3NyBMNiwyMyBDNiwyMy41NTIyODQ3IDUuNTUyMjg0NzUsMjQgNSwyNCBMMiwyNCBDMS40NDc3MTUyNSwyNCAxLDIzLjU1MjI4NDcgMSwyMyBMMC45OTkzMTQyMjIsMTkuMTg0IEw1Ljk5OTMxNDIyLDE1LjI3NyBaIE0xNC40OTkzMTQyLDguNjM2IEwxNC41LDIzIEMxNC41LDIzLjU1MjI4NDcgMTQuMDUyMjg0NywyNCAxMy41LDI0IEwxMC41LDI0IEM5Ljk0NzcxNTI1LDI0IDkuNSwyMy41NTIyODQ3IDkuNSwyMyBMOS40OTkzMTQyMiwxMi41NDMgTDE0LjQ5OTMxNDIsOC42MzYgWiBNMTcuOTk5MzE0Miw4LjMzNCBMMjIuOTk5MzE0MiwxMi4xMDIgTDIzLDIzIEMyMywyMy41NTIyODQ3IDIyLjU1MjI4NDcsMjQgMjIsMjQgTDE5LDI0IEMxOC40NDc3MTUzLDI0IDE4LDIzLjU1MjI4NDcgMTgsMjMgTDE3Ljk5OTMxNDIsOC4zMzQgWiBNNSwwIEM1LjU1MjI4NDc1LDAgNiwwLjQ0NzcxNTI1IDYsMSBMNS45OTkzMTQyMiwxMS40NzEgTDAuOTk5MzE0MjIyLDE1LjM3OCBMMSwxIEMxLDAuNDQ3NzE1MjUgMS40NDc3MTUyNSwwIDIsMCBMNSwwIFogTTEzLjUsMCBDMTQuMDUyMjg0NywwIDE0LjUsMC40NDc3MTUyNSAxNC41LDEgTDE0LjQ5OTMxNDIsNC44MzEgTDkuNDk5MzE0MjIsOC43MzcgTDkuNSwxIEM5LjUsMC40NDc3MTUyNSA5Ljk0NzcxNTI1LDAgMTAuNSwwIEwxMy41LDAgWiBNMjIsMCBDMjIuNTUyMjg0NywwIDIzLDAuNDQ3NzE1MjUgMjMsMSBMMjIuOTk5MzE0Miw4LjM0NyBMMTcuOTk5MzE0Miw0LjU3OSBMMTgsMSBDMTgsMC40NDc3MTUyNSAxOC40NDc3MTUzLDAgMTksMCBMMjIsMCBaIi8%2BCjwvc3ZnPgo%3D \"Libraries.io\")](https://libraries.io/github/thebespokepixel/es-tinycolor \"Libraries.io\")\u0026#x20;  \n[![Snyk](https://snyk.io/test/github/thebespokepixel/es-tinycolor/badge.svg \"Snyk\")](https://snyk.io/test/github/thebespokepixel/es-tinycolor \"Snyk\")\u0026#x20;[![Code-Climate](https://api.codeclimate.com/v1/badges/b2bcb75bd517034aa609/maintainability \"Code-Climate\")](https://codeclimate.com/github/thebespokepixel/es-tinycolor/maintainability \"Code-Climate\")\u0026#x20;[![Code-Climate Coverage](https://api.codeclimate.com/v1/badges/b2bcb75bd517034aa609/test_coverage \"Code-Climate Coverage\")](https://codeclimate.com/github/thebespokepixel/es-tinycolor/test_coverage \"Code-Climate Coverage\")\u0026#x20;  \n\n\n##### Documentation/Help\n\n[![Twitter](https://img.shields.io/twitter/follow/thebespokepixel?style=social \"Twitter\")](https://twitter.com/thebespokepixel \"Twitter\")\u0026#x20;  \n\n\n## Installation\n\n    npm install @thebespokepixel/es-tinycolor\n\n## Usage\n\n\n```js\nimport {tinycolor} from '@thebespokepixel/es-tinycolor'\n\nconst color = tinycolor(\"red\")\n\ncolor.toRgbString() // \"rgba(255, 0, 0, 1)\"\n```\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```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 constructer 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) -\u003e 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) -\u003e 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) -\u003e 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) -\u003e 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) -\u003e 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### invert\n\n`invert: function() -\u003e TinyColor`.  Inverts the color, in RGB colorspace (as opposed to `complement()`, which rotates the hue).\n```js\ntinycolor(\"#f00\").invert().toString(); // \"#00ffff\"\n```\n### greyscale\n\n`greyscale: function() -\u003e 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) -\u003e 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) -\u003e array\u003cTinyColor\u003e`.\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) -\u003e array\u003cTinyColor\u003e`.\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() -\u003e array\u003cTinyColor\u003e`.\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() -\u003e array\u003cTinyColor\u003e`.\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() -\u003e array\u003cTinyColor\u003e`.\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() -\u003e 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) -\u003e 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) -\u003e 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) -\u003e 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(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(tinycolor.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() -\u003e 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\n\n## Typescript\n\nType definitions have been added `index.d.ts`\n\n\n```js\nimport {tinycolor} from '@thebespokepixel/es-tinycolor'\n\nconst color = tinycolor(\"red\")\n\ncolor.toRgbString() // \"rgba(255, 0, 0, 1)\"\n```\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```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 constructer 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) -\u003e 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) -\u003e 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) -\u003e 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) -\u003e 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) -\u003e 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### invert\n\n`invert: function() -\u003e TinyColor`.  Inverts the color, in RGB colorspace (as opposed to `complement()`, which rotates the hue).\n```js\ntinycolor(\"#f00\").invert().toString(); // \"#00ffff\"\n```\n### greyscale\n\n`greyscale: function() -\u003e 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) -\u003e 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) -\u003e array\u003cTinyColor\u003e`.\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) -\u003e array\u003cTinyColor\u003e`.\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() -\u003e array\u003cTinyColor\u003e`.\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() -\u003e array\u003cTinyColor\u003e`.\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() -\u003e array\u003cTinyColor\u003e`.\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() -\u003e 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) -\u003e 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) -\u003e 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) -\u003e 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(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\ntinycolor.mostReadable(tinycolor.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() -\u003e 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\n\n## Documentation\nFull documentation can be found at [https://thebespokepixel.github.io/es-tinycolor/][2]\n\n[1]: https://github.com/bgrins/TinyColor\n[2]: https://thebespokepixel.github.io/es-tinycolor/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebespokepixel%2Fes-tinycolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthebespokepixel%2Fes-tinycolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebespokepixel%2Fes-tinycolor/lists"}