{"id":46688009,"url":"https://github.com/ilariaventurini/colors-convert","last_synced_at":"2026-03-09T02:35:05.740Z","repository":{"id":40003247,"uuid":"219165637","full_name":"ilariaventurini/colors-convert","owner":"ilariaventurini","description":"🦚  A simple colors library ","archived":false,"fork":false,"pushed_at":"2023-01-06T02:18:13.000Z","size":3578,"stargazers_count":18,"open_issues_count":12,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T21:52:27.772Z","etag":null,"topics":["cmyk","cmyk-color","colors","colorspace","converts","hex","hex-color","hsl","hsla","hsla-colors","rgb","rgb-color","rgba","rgba-color"],"latest_commit_sha":null,"homepage":"https://colors-convert-documentation.netlify.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilariaventurini.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-02T14:30:37.000Z","updated_at":"2023-03-15T17:13:23.000Z","dependencies_parsed_at":"2023-02-05T02:45:26.750Z","dependency_job_id":null,"html_url":"https://github.com/ilariaventurini/colors-convert","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/ilariaventurini/colors-convert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilariaventurini%2Fcolors-convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilariaventurini%2Fcolors-convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilariaventurini%2Fcolors-convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilariaventurini%2Fcolors-convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilariaventurini","download_url":"https://codeload.github.com/ilariaventurini/colors-convert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilariaventurini%2Fcolors-convert/sbom","scorecard":{"id":483961,"data":{"date":"2025-08-11","repo":{"name":"github.com/ilariaventurini/colors-convert","commit":"d408d48871ecde7243f8af8169aac71ade9e650b"},"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":"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":"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 1/23 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":"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"74 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-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-7r28-3m3f-r2pr","Warn: Project is vulnerable to: GHSA-r8j5-h5cx-65gg","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-92xj-mqp7-vmcj","Warn: Project is vulnerable to: GHSA-wxgw-qj99-44c2","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","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-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hwj9-h5mp-3pm3","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-9q5w-79cv-947m","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","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-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-g3ch-rx76-35fx","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-19T17:20:03.458Z","repository_id":40003247,"created_at":"2025-08-19T17:20:03.459Z","updated_at":"2025-08-19T17:20:03.459Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30280943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:23:26.802Z","status":"ssl_error","status_checked_at":"2026-03-09T02:22:46.175Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cmyk","cmyk-color","colors","colorspace","converts","hex","hex-color","hsl","hsla","hsla-colors","rgb","rgb-color","rgba","rgba-color"],"created_at":"2026-03-09T02:35:05.164Z","updated_at":"2026-03-09T02:35:05.732Z","avatar_url":"https://github.com/ilariaventurini.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"text-align: center\"\u003e\n  \u003cimg src=\"./public/peacock.svg\" width=\"250\"\u003e\n  \n  \u003ch1\u003eColors convert\u003c/h1\u003e\n  \u003cdiv\u003eA simple colors library\u003c/div\u003e\n\u003c/div\u003e\n\n---\n\nUsing `colors-convert` you can:\n\n- read colors in different formats\n- analyze and manipulate colors\n- convert colors into different formats\n- give a name to a color\n- mix colors\n- create random colors.\n\n## How to use\n\n```bash\nyarn add colors-convert\n```\n\nor\n\n```bash\nnpm install --save colors-convert\n```\n\n## API overview\n\nGo [here](https://colors-convert-documentation.netlify.app/) to take a look at the complete API.\n\n### Color formats\n\nDifferent color formats are supported: hex, rgb, rgba, hsl, hsla and cmyk.\n\n#### Hex\n\nA valid hex color can be:\n\n- `#rrggbb[aa]`(6/8-digit, long form)\n- `#rgb[a]` (3/4-digit, short form)\nwith `r`, `g`, `b`, `a` in `[0-9a-fA-F]`.\n\n#### Rgb\n\nA valid rgb color is an object like this `{r, g, b}` with `r, b, g` numeric values in `[0, 255]`.\n\n#### Rgba\n\nA valid rgba color is an object like this `{r, g, b, a}` with `r, g, b` numeric values in `[0, 255]` and `a` in `[0, 1]`.\n\n#### Hsl\n\nA valid hsl color is an object like this `{h, s, l}` with:\n\n- `h` (hue): `[0-359]°`\n- `s` (saturation): `[0-100]%`\n- `l` (lightness): `[0-100]%`.\n  \n#### Hsla\n\nA valid hsl color is an object like this `{h, s, l}` with:\n\n- `h` (hue): `[0-359]°`\n- `s` (saturation): `[0-100]%`\n- `l` (lightness): `[0-100]%`\n- `a` (alpha): `[0-1]`.\n\n#### Cmyk\n\nA valid cmyk color is an object like this `{c, m, y, k}` with `c, m, y, k` numeric values in `[0, 100]`.\n\n---\n\n### Conversion\n\nYou can convert a color in any format to any other supported format.\n\n| from \\ to |     Hex      |     Rgb      |     Rgba      |     Hsl      |     Hsla      |     Cmyk      |\n| :-------: | :----------: | :----------: | :-----------: | :----------: | :-----------: | :-----------: |\n|  **Hex**  |      \\       |  `hexToRgb`  |  `hexToRgba`  |  `hexToHsl`  |  `hexToHsla`  |  `hexToCmyk`  |\n|  **Rgb**  |  `rgbToHex`  |      \\       |  `rgbToRgba`  |  `rgbToHsl`  |  `rgbToHsla`  |  `rgbToCmyk`  |\n| **Rgba**  | `rgbaToHex`  | `rgbaToRgb`  |       \\       | `rgbaToHsl`  | `rgbaToHsla`  | `rgbaToCmyk`  |\n|  **Hsl**  |  `hslToHex`  |  `hslToRgb`  |  `hslToRgba`  |      \\       |  `hslToHsla`  |  `hslToCmyk`  |\n| **Hsla**  | `hslaToHex`  | `hslaToRgb`  | `hslaToRgba`  | `hslaToHsl`  |       \\       | `hslaToCmyk`  |\n| **Cmyk**  | `cmykToHex`  | `cmykToRgb`  | `cmykToRgba`  | `cmykToHsl`  | `cmykToHsla`  |       \\       |\n| **Color** | `colorToHex` | `colorToRgb` | `colorToRgba` | `colorToHsl` | `colorToHsla` | `colorToCmyk` |\n\n### Specific functions by color format\n\nThen there are more specific color format functions. You can also convert a Color to a redeable string format or a CSS string format.\nGo [here](https://colors-convert-documentation.netlify.app/) to take a look at the complete API.\n\n### Other useful functions\n\n- `name(color: Color): string`: given a color (hex, rgb, rgba, hsl, hsla, cmyk), it returns the name of that color. It works using a list of [18315 unique color names](https://api.color.pizza/v1/).\n\n- `mix(colors: Color[], weights?: number[]): rgb`: mix two or more colors based on their weights.\n\n- `randomHex(): HEX`: return a random hex.\n\n## 🎉 What's new in 1.3.0\n\n- **[add]** add the following functions: `colorToHex`, `color2rgba`, `rgbaToHex`, `cmykToRgba`, `cmykToHsla`, `hexToHsla`, `rgbToHsla`, `rgbaToHsla`, `hslToRgba`, `colorToCmyk`, `colorToHsl`, `hslToHsla`, `colorToHsla`, `hslaStringToObject`, `hexToRgb`, `hexToRgba`, `shortToLongHex`\n- **[add]** add hsla color format\n- **[add]** test coverage \u003e 97%\n- **[add]** add api page\n- **[add]** add a new logo\n- **[change]** set as deprecated the following functions: `color2string`, `color2cssString`, `hex2rgbOrRgba`, `hex2rgba`, `hex2hexWithAlpha`, `hex2cmyk`, `hex2hsl`, `rgb2hex`, `rgb2cmyk`, `rgb2hsl`, `rgb2rgba`, `color2rgb`, `rgbString2Object`, `rgba2rgb`, `rgbaString2Object`, `cmyk2hex`, `cmyk2rgb`, `cmyk2hsl`, `cmykString2Object`, `hsl2hex`, `hsl2rgb`, `hsl2cmyk`, `hslString2Object`, `getRandomColor`,\n- **[change]** `rgb2rgba` has optional alpha parameter\n- **[change]** `ColorName` type: is no more a string but an object with name, hex and rgb\n- **[fix]** `#00000` is not a valid hex color\n\nGo [here](https://github.com/ilariaventurini/colors-convert/blob/master/CHANGELOG.md) to see the CHANGELOG.\n\n# License\n\n[MIT](https://github.com/ilariaventurini/colors-convert/blob/master/LICENSE) © [Ilaria Venturini](https://github.com/ilariaventurini)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filariaventurini%2Fcolors-convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filariaventurini%2Fcolors-convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filariaventurini%2Fcolors-convert/lists"}