{"id":37029651,"url":"https://github.com/chartjs/chartjs-color","last_synced_at":"2026-01-14T03:34:20.876Z","repository":{"id":57197202,"uuid":"58283415","full_name":"chartjs/chartjs-color","owner":"chartjs","description":"JavaScript color conversion and manipulation library","archived":false,"fork":true,"pushed_at":"2019-10-25T20:49:56.000Z","size":94,"stargazers_count":21,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-24T22:39:20.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Qix-/color","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chartjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-07T20:34:22.000Z","updated_at":"2023-02-07T11:27:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chartjs/chartjs-color","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/chartjs/chartjs-color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartjs%2Fchartjs-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartjs%2Fchartjs-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartjs%2Fchartjs-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartjs%2Fchartjs-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chartjs","download_url":"https://codeload.github.com/chartjs/chartjs-color/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chartjs%2Fchartjs-color/sbom","scorecard":{"id":274678,"data":{"date":"2025-08-11","repo":{"name":"github.com/chartjs/chartjs-color","commit":"df3bfdc1a365dc1460646a8ff4c1c0a05971a2bc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"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":"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":"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":1,"reason":"Found 4/24 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.4.1 not signed: https://api.github.com/repos/chartjs/chartjs-color/releases/20988865","Warn: release artifact 2.4.0 not signed: https://api.github.com/repos/chartjs/chartjs-color/releases/18226100","Warn: release artifact v2.3.0 not signed: https://api.github.com/repos/chartjs/chartjs-color/releases/15966979","Warn: release artifact v2.2.0 not signed: https://api.github.com/repos/chartjs/chartjs-color/releases/7695760","Warn: release artifact v2.1.0 not signed: https://api.github.com/repos/chartjs/chartjs-color/releases/5504069","Warn: release artifact v2.4.1 does not have provenance: https://api.github.com/repos/chartjs/chartjs-color/releases/20988865","Warn: release artifact 2.4.0 does not have provenance: https://api.github.com/repos/chartjs/chartjs-color/releases/18226100","Warn: release artifact v2.3.0 does not have provenance: https://api.github.com/repos/chartjs/chartjs-color/releases/15966979","Warn: release artifact v2.2.0 does not have provenance: https://api.github.com/repos/chartjs/chartjs-color/releases/7695760","Warn: release artifact v2.1.0 does not have provenance: https://api.github.com/repos/chartjs/chartjs-color/releases/5504069"],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 10 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"}}]},"last_synced_at":"2025-08-17T14:09:14.879Z","repository_id":57197202,"created_at":"2025-08-17T14:09:14.879Z","updated_at":"2025-08-17T14:09:14.879Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":[],"created_at":"2026-01-14T03:34:20.148Z","updated_at":"2026-01-14T03:34:20.859Z","avatar_url":"https://github.com/chartjs.png","language":"JavaScript","readme":"# chartjs-color\n\n[![npm](https://img.shields.io/npm/v/chartjs-color.svg?style=flat-square)](https://npmjs.com/package/chartjs-color) [![Travis](https://img.shields.io/travis/chartjs/chartjs-color.svg?style=flat-square)](https://travis-ci.org/chartjs/chartjs-color)\n\n\u003e JavaScript library for color conversion and manipulation with support for CSS color strings.\n\n```js\nvar color = Color(\"#7743CE\");\n\ncolor.alpha(0.5).lighten(0.5);\n\nconsole.log(color.hslString());  // \"hsla(262, 59%, 81%, 0.5)\"\n```\n\n## Install\n\n```console\n$ npm install color\n```\n\n## Usage\n\n```js\nvar Color = require(\"color\")\n```\n\n### Setters\n\n```js\nvar color = Color(\"rgb(255, 255, 255)\")\nvar color = Color({r: 255, g: 255, b: 255})\nvar color = Color().rgb(255, 255, 255)\nvar color = Color().rgb([255, 255, 255])\n```\nPass any valid CSS color string into `Color()` or a hash of values. Also load in color values with `rgb()`, `hsl()`, `hsv()`, `hwb()`, and `cmyk()`.\n\n```js\ncolor.red(120)\n```\nSet the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturation` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black`\n\n### Getters\n\n\n```js\ncolor.rgb()       // {r: 255, g: 255, b: 255}\n```\nGet a hash of the rgb values with `rgb()`, similarly for `hsl()`, `hsv()`, and `cmyk()`\n\n```js\ncolor.rgbArray()  // [255, 255, 255]\n```\nGet an array of the values with `rgbArray()`, `hslArray()`, `hsvArray()`, and `cmykArray()`.\n\n```js\ncolor.red()       // 255\n```\nGet the value for an individual channel.\n\n### CSS Strings\n\n```js\ncolor.hslString()  // \"hsl(320, 50%, 100%)\"\n```\n\nDifferent CSS String formats for the color are on `hexString`, `rgbString`, `percentString`, `hslString`, `hwbString`, and `keyword` (undefined if it's not a keyword color). `\"rgba\"` and `\"hsla\"` are used if the current alpha value of the color isn't `1`.\n\n### Luminosity\n\n```js\ncolor.luminosity();  // 0.412\n```\nThe [WCAG luminosity](http://www.w3.org/TR/WCAG20/#relativeluminancedef) of the color. 0 is black, 1 is white.\n\n```js\ncolor.contrast(Color(\"blue\"))  // 12\n```\nThe [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black).\n\n```js\ncolor.light();  // true\ncolor.dark();   // false\n```\nGet whether the color is \"light\" or \"dark\", useful for deciding text color.\n\n### Manipulation\n\n```js\ncolor.negate()         // rgb(0, 100, 255) -\u003e rgb(255, 155, 0)\n\ncolor.lighten(0.5)     // hsl(100, 50%, 50%) -\u003e hsl(100, 50%, 75%)\ncolor.darken(0.5)      // hsl(100, 50%, 50%) -\u003e hsl(100, 50%, 25%)\n\ncolor.saturate(0.5)    // hsl(100, 50%, 50%) -\u003e hsl(100, 75%, 50%)\ncolor.desaturate(0.5)  // hsl(100, 50%, 50%) -\u003e hsl(100, 25%, 50%)\ncolor.greyscale()      // #5CBF54 -\u003e #969696\n\ncolor.whiten(0.5)      // hwb(100, 50%, 50%) -\u003e hwb(100, 75%, 50%)\ncolor.blacken(0.5)     // hwb(100, 50%, 50%) -\u003e hwb(100, 50%, 75%)\n\ncolor.clearer(0.5)     // rgba(10, 10, 10, 0.8) -\u003e rgba(10, 10, 10, 0.4)\ncolor.opaquer(0.5)     // rgba(10, 10, 10, 0.8) -\u003e rgba(10, 10, 10, 1.0)\n\ncolor.rotate(180)      // hsl(60, 20%, 20%) -\u003e hsl(240, 20%, 20%)\ncolor.rotate(-90)      // hsl(60, 20%, 20%) -\u003e hsl(330, 20%, 20%)\n\ncolor.mix(Color(\"yellow\"))        // cyan -\u003e rgb(128, 255, 128)\ncolor.mix(Color(\"yellow\"), 0.3)   // cyan -\u003e rgb(77, 255, 179)\n\n// chaining\ncolor.green(100).greyscale().lighten(0.6)\n```\n\n### Clone\n\nYou can can create a copy of an existing color object using `clone()`:\n\n```js\ncolor.clone() // -\u003e New color object\n```\n\nAnd more to come...\n\n## Propers\n\nThe API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartjs%2Fchartjs-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchartjs%2Fchartjs-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchartjs%2Fchartjs-color/lists"}