{"id":22364137,"url":"https://github.com/11ways/color","last_synced_at":"2026-07-02T00:31:31.218Z","repository":{"id":140528252,"uuid":"200084857","full_name":"11ways/color","owner":"11ways","description":"Color","archived":false,"fork":false,"pushed_at":"2020-07-21T12:44:50.000Z","size":16,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-29T01:56:37.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/11ways.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-01T16:30:16.000Z","updated_at":"2019-09-16T09:03:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"99358724-2c06-47c4-a54d-bcfc2cb34483","html_url":"https://github.com/11ways/color","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/11ways/color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/11ways","download_url":"https://codeload.github.com/11ways/color/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/11ways%2Fcolor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35028642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"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":"2024-12-04T17:18:36.963Z","updated_at":"2026-07-02T00:31:31.193Z","avatar_url":"https://github.com/11ways.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cb\u003e@11ways/color\u003c/b\u003e\n\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- CI - TravisCI --\u003e\n  \u003ca href=\"https://travis-ci.org/11ways/color\"\u003e\n    \u003cimg src=\"https://img.shields.io/travis/typicode/husky/master.svg?label=Mac%20OSX%20%26%20Linux\" alt=\"Mac/Linux Build Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- CI - AppVeyor --\u003e\n  \u003ca href=\"https://ci.appveyor.com/project/11ways/color\"\u003e\n    \u003cimg src=\"https://img.shields.io/appveyor/ci/11ways/color/master.svg?label=Windows\" alt=\"Windows Build status\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Coverage - Codecov --\u003e\n  \u003ca href=\"https://codecov.io/gh/11ways/color\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/11ways/color/master.svg\" alt=\"Codecov Coverage report\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- DM - Snyk --\u003e\n  \u003ca href=\"https://snyk.io/test/github/11ways/color?targetFile=package.json\"\u003e\n    \u003cimg src=\"https://snyk.io/test/github/11ways/color/badge.svg?targetFile=package.json\" alt=\"Known Vulnerabilities\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- DM - David --\u003e\n  \u003ca href=\"https://david-dm.org/11ways/color\"\u003e\n    \u003cimg src=\"https://david-dm.org/11ways/color/status.svg\" alt=\"Dependency Status\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Version - npm --\u003e\n  \u003ca href=\"https://www.npmjs.com/package/node-skeleton\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/node-skeleton.svg\" alt=\"Latest version on npm\" /\u003e\n  \u003c/a\u003e\n\n  \u003c!-- License - MIT --\u003e\n  \u003ca href=\"https://github.com/11ways/color#license\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/11ways/color.svg\" alt=\"Project license\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  🌈 Color type for JavaScript\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003e\n    Coded with ❤️ by \u003ca href=\"#authors\"\u003eJelle De Loecker\u003c/a\u003e.\n  \u003c/sub\u003e\n\u003c/div\u003e\n\n\n## Introduction\n\nWorking with color instances\n\n## Install\n\n```bash\nnpm install @11ways/color\n```\n\n## Usage\n\n```js\nvar Color = require('@11ways/color');\n```\n\n## API\n\n### Constructors\n\n```js\nvar yellow = new Color('yellow');\nvar yellow = new Color('#ffff00');\nvar yellow = new Color('hsla(60, 100%, 50%, 1)');\nvar yellow = new Color({r: 255, g: 255, b: 0});\n```\n\n### #luminosity ⇒ `number`\n\nThe WCAG luminosity of the color.\nThis can also be used as a setter, though it will only attempt to approximate it.\n\n### #whiten(ratio) ⇒ `this`\n\nUsing the HWB model, \nwhiten the current color by adding the current whiteness * the given ratio.\n\nIf the whiteness is currently 0, the ratio is added as-is.\n\n### #blacken(ratio) ⇒ `this`\n\nUsing the HWB model, \nblacken the current color by adding the current blakcness * the given ratio.\n\nIf the blackness is currently 0, the ratio is added as-is.\n\n### #lighten(ratio) ⇒ `this`\n\nUsing the HSL model, \nlighten the current color by adding the current lightness * the given ratio.\n\nIf the lightness is currently 0, the ratio is added as-is.\n\n### #darken(ratio) ⇒ `this`\n\nUsing the HSL model, \ndarken the current color by subtracting the current lightness * the given ratio.\n\nIf the lightness is currently 0, nothing is changed.\n\n### #contrast(other_color) ⇒ `number`\n\nCalculate the contrast between this and the other color.\n\n### #makeReadable(other_color, target_contrast = 7.1, allow_changing_other_color = true) ⇒ `boolean`\n\nMake this readable on the given color.\n\n## Contributing\nContributions are REALLY welcome.\nPlease check the [contributing guidelines](.github/contributing.md) for more details. Thanks!\n\n## Authors\n- **Jelle De Loecker** -  *Follow* me on *Github* ([:octocat:@skerit](https://github.com/skerit)) and on  *Twitter* ([🐦@skeriten](http://twitter.com/intent/user?screen_name=skeriten))\n\nSee also the list of [contributors](https://github.com/11ways/color/contributors) who participated in this project.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/11ways/color/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F11ways%2Fcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F11ways%2Fcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F11ways%2Fcolor/lists"}