{"id":17370424,"url":"https://github.com/juliuste/closest-css-color","last_synced_at":"2025-04-08T03:34:50.146Z","repository":{"id":50755041,"uuid":"124343271","full_name":"juliuste/closest-css-color","owner":"juliuste","description":"Find the closest CSS color keyword for a given HEX color value.","archived":false,"fork":false,"pushed_at":"2021-05-31T04:01:06.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-17T05:29:18.473Z","etag":null,"topics":["library"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juliuste.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":"2018-03-08T05:48:18.000Z","updated_at":"2022-05-25T23:34:12.000Z","dependencies_parsed_at":"2022-09-02T13:41:11.323Z","dependency_job_id":null,"html_url":"https://github.com/juliuste/closest-css-color","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fclosest-css-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fclosest-css-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fclosest-css-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliuste%2Fclosest-css-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliuste","download_url":"https://codeload.github.com/juliuste/closest-css-color/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223300835,"owners_count":17122700,"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","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":["library"],"created_at":"2024-10-16T00:58:01.247Z","updated_at":"2024-11-06T07:32:59.501Z","avatar_url":"https://github.com/juliuste.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# closest-css-color\n\nFind the closest CSS color keyword for a given hex color value.\n\n[![npm version](https://img.shields.io/npm/v/closest-css-color.svg)](https://www.npmjs.com/package/closest-css-color)\n[![Build status](https://travis-ci.org/juliuste/closest-css-color.svg?branch=master)](https://travis-ci.org/juliuste/closest-css-color)\n[![License](https://img.shields.io/github/license/juliuste/closest-css-color.svg?style=flat)](license)\n[![Contact me](https://img.shields.io/badge/contact-email-turquoise)](mailto:mail@juliustens.eu)\n\n## Installation\n\n```bash\nnpm install --save closest-css-color\n```\n\n## `closestColor(hex, { detailed = false }})`\n```js\nconst closestColor = require('closest-css-color')\n\n// normal usage\nconst color = closestColor('#a00a0a')\nconsole.log(simpleColor)\n// -\u003e 'darkred'\n\n// with the `detailed` option\nconst colorWithAdditionalInformation = closestColor('#1019a6', { detailed: true })\nconsole.log(detailedColor)\n// -\u003e {\n//     name: 'darkblue',\n//     hex: '#00008b',\n//     rgb: {red: 0, green: 0, blue: 139}\n// }\n```\n\n## Contributing\n\nIf you found a bug or want to propose a feature, feel free to visit [the issues page](https://github.com/juliuste/closest-css-color/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliuste%2Fclosest-css-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliuste%2Fclosest-css-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliuste%2Fclosest-css-color/lists"}