{"id":17364937,"url":"https://github.com/timoxley/colornames","last_synced_at":"2025-04-06T11:08:30.221Z","repository":{"id":49287503,"uuid":"6785523","full_name":"timoxley/colornames","owner":"timoxley","description":"Map color names to HEX color values","archived":false,"fork":false,"pushed_at":"2021-06-20T04:30:34.000Z","size":23,"stargazers_count":50,"open_issues_count":6,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T09:09:32.697Z","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/timoxley.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"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":"2012-11-20T21:31:59.000Z","updated_at":"2025-02-26T17:36:26.000Z","dependencies_parsed_at":"2022-09-06T10:50:44.264Z","dependency_job_id":null,"html_url":"https://github.com/timoxley/colornames","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoxley%2Fcolornames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoxley%2Fcolornames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoxley%2Fcolornames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoxley%2Fcolornames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timoxley","download_url":"https://codeload.github.com/timoxley/colornames/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471519,"owners_count":20944158,"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":[],"created_at":"2024-10-15T20:51:10.345Z","updated_at":"2025-04-06T11:08:30.186Z","avatar_url":"https://github.com/timoxley.png","language":"JavaScript","funding_links":[],"categories":["Color"],"sub_categories":["React Components"],"readme":"# colornames\n\n### Convert color names to HEX color values.\n\n[![NPM](https://nodei.co/npm/colornames.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm-dl/colornames/)\n[![NPM](https://nodei.co/npm-dl/colornames.png?months=3\u0026height=3\u0026chrome)](https://nodei.co/npm/colornames/)\n\n[![Build Status](https://travis-ci.org/timoxley/colornames.png?branch=master)](https://travis-ci.org/timoxley/colornames)\n[![Dependency Status](https://david-dm.org/timoxley/colornames.png)](https://david-dm.org/timoxley/colornames)\n\n\n\n## Installation\n\n### Component\n    $ component install timoxley/colornames\n\n### Node/Browserify\n    $ npm install colornames\n\n## Example\n\n```js\nvar toHex = require('colornames')\n```\n\n### VGA color names\n```js\ntoHex('red') // =\u003e \"#FF0000\"\ntoHex('blue') // =\u003e \"#0000FF\"\n```\n\n### CSS color names\n```js\ntoHex('lightsalmon') // =\u003e \"#FFA07A\"\ntoHex('mediumvioletred') // =\u003e \"#C71585\"\n```\n\n### Get meta data about a color\n```js\ntoHex.get('red')\n// =\u003e\n{\n  name: \"red\",\n  css: true,\n  value: \"#FF0000\",\n  vga: true\n}\n```\n\n### Conversion is case-insensitive\n```js\ntoHex('Blue') // =\u003e \"#0000FF\"\ntoHex('BLUE') // =\u003e \"#0000FF\"\ntoHex('BlUe') // =\u003e \"#0000FF\"\n```\n\n## API\n\n### colornames(name)\nGet HEX code for a color name, or `undefined` if unknown.\n\n### .get(name)\nAll known data about color, including whether valid VGA or CSS color\nname.\n\n### .get.vga(name)\nHEX code for a color name, only if the color is a valid VGA color\nname.\n\n### .get.css(name)\nHEX code for a color name, only if the color is a valid CSS color\nname.\n\n###.all()\nGet all color names data.\n\n## License\n\n  MIT\n\n## Complete Color Map\n\n![example-color-table-](https://f.cloud.github.com/assets/43438/643981/f57948a0-d381-11e2-99fd-197c44065564.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoxley%2Fcolornames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoxley%2Fcolornames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoxley%2Fcolornames/lists"}