{"id":16520571,"url":"https://github.com/layflags/number-to-css-color","last_synced_at":"2025-04-04T19:18:06.682Z","repository":{"id":51776979,"uuid":"43050188","full_name":"layflags/number-to-css-color","owner":"layflags","description":"Converts a number to a CSS hex color","archived":false,"fork":false,"pushed_at":"2022-12-04T04:18:39.000Z","size":106,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T09:16:17.108Z","etag":null,"topics":[],"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/layflags.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":"2015-09-24T06:56:50.000Z","updated_at":"2022-04-29T23:25:05.000Z","dependencies_parsed_at":"2023-01-24T00:00:17.583Z","dependency_job_id":null,"html_url":"https://github.com/layflags/number-to-css-color","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/layflags%2Fnumber-to-css-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layflags%2Fnumber-to-css-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layflags%2Fnumber-to-css-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/layflags%2Fnumber-to-css-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/layflags","download_url":"https://codeload.github.com/layflags/number-to-css-color/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234944,"owners_count":20905855,"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-11T16:51:38.160Z","updated_at":"2025-04-04T19:18:06.667Z","avatar_url":"https://github.com/layflags.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# number-to-css-color\n\n[![es6](https://camo.githubusercontent.com/d25414161ebfbbdd0f69a4a3e6a188a76ae2e82a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f65732d362d627269676874677265656e2e737667)](https://babeljs.io/docs/usage/polyfill/)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n[![CircleCI](https://circleci.com/gh/layflags/number-to-css-color.svg?style=svg)](https://circleci.com/gh/layflags/number-to-css-color)\n\nConverts a number to a CSS hex color. It even supports the [upcoming CSS4 8 digits notation](https://drafts.csswg.org/css-color/#hex-notation) with alpha.\n\n**A note about compatibility**\n\nThe [npm package](https://www.npmjs.com/package/number-to-css-color) should be used in\nan **ES6 environment**. Even though the published code has ES5 syntax it uses\nsome ES6 features, so you have to make sure to use ES5 and ES6 polyfills if you\nare in an ancient environment.\n\n## Install\n\n```bash\nnpm install number-to-css-color\n```\n\n## Usage\n\n```javascript\nimport convert from 'number-to-css-color'\n\nconsole.log(convert(0xf)) // -\u003e \"#00000f\"\nconsole.log(convert(0x10c, {alpha: true})) // -\u003e \"#0000010c\"\n```\n\n## Test\n\n```bash\nnpm test\n```\n\n## License\n\n[MIT](LICENSE)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayflags%2Fnumber-to-css-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayflags%2Fnumber-to-css-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayflags%2Fnumber-to-css-color/lists"}