{"id":13701931,"url":"https://github.com/nagix/chartjs-plugin-colorschemes","last_synced_at":"2025-10-03T14:10:30.597Z","repository":{"id":40744041,"uuid":"154599841","full_name":"nagix/chartjs-plugin-colorschemes","owner":"nagix","description":"Predefined color schemes for Chart.js","archived":false,"fork":false,"pushed_at":"2023-05-20T17:18:26.000Z","size":297,"stargazers_count":275,"open_issues_count":21,"forks_count":58,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-09-09T06:38:37.603Z","etag":null,"topics":["brewer","chartjs","color","office","palette","plugin","scheme","tableau"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/nagix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-10-25T02:44:10.000Z","updated_at":"2025-08-26T17:50:41.000Z","dependencies_parsed_at":"2024-01-14T19:14:10.524Z","dependency_job_id":"ab6c23a3-daa7-4a35-811c-eaafed4b4b54","html_url":"https://github.com/nagix/chartjs-plugin-colorschemes","commit_stats":{"total_commits":27,"total_committers":5,"mean_commits":5.4,"dds":"0.18518518518518523","last_synced_commit":"d96a01846626881aa4bec56828c333af81050906"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/nagix/chartjs-plugin-colorschemes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagix%2Fchartjs-plugin-colorschemes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagix%2Fchartjs-plugin-colorschemes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagix%2Fchartjs-plugin-colorschemes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagix%2Fchartjs-plugin-colorschemes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nagix","download_url":"https://codeload.github.com/nagix/chartjs-plugin-colorschemes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nagix%2Fchartjs-plugin-colorschemes/sbom","scorecard":{"id":672888,"data":{"date":"2025-08-11","repo":{"name":"github.com/nagix/chartjs-plugin-colorschemes","commit":"d96a01846626881aa4bec56828c333af81050906"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":1,"reason":"Found 5/27 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":"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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 v0.4.0 not signed: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/17674864","Warn: release artifact v0.3.0 not signed: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/15070568","Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/14062772","Warn: release artifact v0.1.0 not signed: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/13823618","Warn: release artifact v0.4.0 does not have provenance: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/17674864","Warn: release artifact v0.3.0 does not have provenance: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/15070568","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/14062772","Warn: release artifact v0.1.0 does not have provenance: https://api.github.com/repos/nagix/chartjs-plugin-colorschemes/releases/13823618"],"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'","Warn: branch protection not enabled for branch 'release'"],"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 5 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-21T20:45:21.358Z","repository_id":40744041,"created_at":"2025-08-21T20:45:21.358Z","updated_at":"2025-08-21T20:45:21.358Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278173367,"owners_count":25942293,"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-10-03T02:00:06.070Z","response_time":53,"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":["brewer","chartjs","color","office","palette","plugin","scheme","tableau"],"created_at":"2024-08-02T21:00:27.730Z","updated_at":"2025-10-03T14:10:30.554Z","avatar_url":"https://github.com/nagix.png","language":"JavaScript","funding_links":[],"categories":["Plugins","JavaScript"],"sub_categories":["Styling"],"readme":"# chartjs-plugin-colorschemes\n\n[![npm](https://img.shields.io/npm/v/chartjs-plugin-colorschemes.svg?style=flat-square)](https://npmjs.com/package/chartjs-plugin-colorschemes) [![Bower](https://img.shields.io/bower/v/chartjs-plugin-colorschemes.svg?style=flat-square)](https://libraries.io/bower/chartjs-plugin-colorschemes) [![Travis](https://img.shields.io/travis/nagix/chartjs-plugin-colorschemes/master.svg?style=flat-square)](https://travis-ci.org/nagix/chartjs-plugin-colorschemes) [![Coverage](https://img.shields.io/codeclimate/coverage/nagix/chartjs-plugin-colorschemes.svg?style=flat-square)](https://codeclimate.com/github/nagix/chartjs-plugin-colorschemes)  [![Maintainability](https://img.shields.io/codeclimate/maintainability/nagix/chartjs-plugin-colorschemes.svg?style=flat-square)](https://codeclimate.com/github/nagix/chartjs-plugin-colorschemes) [![Awesome](https://awesome.re/badge-flat2.svg)](https://github.com/chartjs/awesome)\n\n*Predefined color schemes for [Chart.js](https://www.chartjs.org)*\n\nYou can pick the perfect color combination for your charts from the predefined color schemes, which are based on popular tools such as [ColorBrewer](http://colorbrewer2.org), [Microsoft Office](https://products.office.com) and [Tableau](https://www.tableau.com).\n\nThis plugin requires Chart.js 2.5.0 or later.\n\n## Installation\n\nYou can download the latest version of chartjs-plugin-colorschemes from the [GitHub releases](https://github.com/nagix/chartjs-plugin-colorschemes/releases/latest).\n\nTo install via npm:\n\n```bash\nnpm install chartjs-plugin-colorschemes --save\n```\n\nTo install via bower:\n\n```bash\nbower install chartjs-plugin-colorschemes --save\n```\n\nTo use CDN:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/chartjs-plugin-colorschemes\"\u003e\u003c/script\u003e\n```\n```html\n\u003cscript src=\"https://unpkg.com/chartjs-plugin-colorschemes\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nchartjs-plugin-colorschemes can be used with ES6 modules, plain JavaScript and module loaders.\n\nInclude Chart.js and chartjs-plugin-colorschemes.js to your page, and specify a color scheme as shown in the example below. You can pick a scheme from [Color Chart](https://nagix.github.io/chartjs-plugin-colorschemes/colorchart.html).\n\n```js\n    options: {\n        plugins: {\n            colorschemes: {\n                scheme: 'brewer.Paired12'\n            }\n        }\n    }\n```\n\nEvery color scheme has a number at the end of its name, which indicates the number of that colors included in the scheme. If the number of the datasets is larger than it, the same colors will appear repeatedly. A color is not modified if it is specified by dataset options.\n\n### Usage in ES6 as Module\n\nNothing else than importing the module should be enough.\n\n```js\nimport 'chartjs-plugin-colorschemes';\n```\n\nIf you want to reduce the size by only importing the plugin core and particular color schemes, see the example below.\n\n```js\n// import the plugin core\nimport 'chartjs-plugin-colorschemes/src/plugins/plugin.colorschemes';\n\n// import a particular color scheme\nimport { Aspect6 } from 'chartjs-plugin-colorschemes/src/colorschemes/colorschemes.office';\n\n// ...\n    options: {\n        plugins: {\n            colorschemes: {\n                scheme: Aspect6\n            }\n        }\n    }\n//...\n```\n\n## Tutorial\n\nYou can find a tutorial at [nagix.github.io/chartjs-plugin-colorschemes](https://nagix.github.io/chartjs-plugin-colorschemes).\n\n## Configuration\n\nThe plugin options can be changed at 2 different levels and with the following priority:\n\n- per chart: `options.plugins.colorschemes.*`\n- globally: `Chart.defaults.global.plugins.colorschemes.*`\n\nAll available options are listed below.\n\n| Name | Type | Default | Description\n| ---- | ---- | ------- | -----------\n| `fillAlpha` | `number` | `0.5` | The transparency value for the line fill color. Must be a number between `0.0` (fully transparent) and `1.0` (no transparency).\n| `scheme` | \u003ccode\u003estring\u0026#124;string[]\u003c/code\u003e | `'brewer.Paired12'` | Color scheme name that is any of [Color Chart](https://nagix.github.io/chartjs-plugin-colorschemes/colorchart.html). It also accepts an array of color strings, which is primarily for ES modules. [more...](#usage-in-es6-as-module)\n| `reverse` | `boolean` | `false` | If set to `true`, the order of the colors in the selected  scheme is reversed.\n| `override` | `boolean` | `false` | If set to `true`, the specified color scheme will override the existing color options. If `false`, it is only applied when no color setting exists. [more...](#overriding-existing-color-settings)\n| `custom` | `function` | `undefined` | A function that takes a copy of the color string array for `scheme` in order to extend the predefined scheme colors. [more...](#custom-function)\n\n### Overriding Existing Color Settings\n\nBy default, this plugin doesn't apply a color scheme if any color options are already specified. This may cause a problem if you are using a third party library such as [ng-charts](https://valor-software.com/ng2-charts/), which automatically applies default color settings. In that case, the existing color settings can be overridden by setting the `override` option to `true`.\n\n### `custom`-Function\n\nWith the help of the `custom`-Function you can extend the predefined scheme colors. This function takes a copy of the current scheme and is expected to return an array with at least one element. See the example below.\n\n```js\nvar customColorFunction = function(schemeColors) {\n    var myColors = ['#ff0000', '#00ff00', '#0000ff']; // define/generate own colors\n\n    // extend the color scheme with own colors\n    Array.prototype.push.apply(schemeColors, myColors);\n\n    return schemeColors; // optional: this is not needed if the array is modified in place\n};\n\n// ...\n    options: {\n        plugins: {\n            colorschemes: {\n                scheme: 'brewer.Paired12',\n                custom: customColorFunction\n            }\n        }\n    }\n//...\n\n```\n\n### `custom` colorscheme from scratch\n\nIt is possible to build your custom colorscheme from scratch (without using the `custom` function) by simply defining the colors it contains. See example below.\n\n```js\nvar myColors = ['red', 'green', 'blue', 'orange', 'black', 'yellow'];\n\n// ...\n    options: {\n        plugins: {\n            colorschemes: {\n                scheme: myColors\n            }\n        }\n    }\n//...\n\n```\n\n## Building\n\nYou first need to install node dependencies (requires [Node.js](https://nodejs.org/)):\n\n```bash\nnpm install\n```\n\nThe following commands will then be available from the repository root:\n\n```bash\ngulp build            # build dist files\ngulp build --watch    # build and watch for changes\ngulp test             # run all tests\ngulp test --watch     # run all tests and watch for changes\ngulp test --coverage  # run all tests and generate code coverage\ngulp lint             # perform code linting\ngulp package          # create an archive with dist files and samples\n```\n\n## License\n\nchartjs-plugin-colorschemes is available under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagix%2Fchartjs-plugin-colorschemes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnagix%2Fchartjs-plugin-colorschemes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnagix%2Fchartjs-plugin-colorschemes/lists"}