{"id":21298844,"url":"https://github.com/pagyew/safolor","last_synced_at":"2025-03-15T17:44:27.106Z","repository":{"id":230880715,"uuid":"780357020","full_name":"pagyew/safolor","owner":"pagyew","description":"💾 🎨 Convert colors to 8-bit web-safe colors","archived":false,"fork":false,"pushed_at":"2024-04-19T09:06:37.000Z","size":412,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T03:04:33.562Z","etag":null,"topics":["colors","converter","utils","web-safe"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/pagyew.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-01T09:55:28.000Z","updated_at":"2024-06-01T09:12:30.000Z","dependencies_parsed_at":"2024-04-16T10:36:48.721Z","dependency_job_id":"e32f6866-bbf5-4fd3-8bd6-d4fe49e36d2d","html_url":"https://github.com/pagyew/safolor","commit_stats":null,"previous_names":["pagyew/safolor"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagyew%2Fsafolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagyew%2Fsafolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagyew%2Fsafolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pagyew%2Fsafolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pagyew","download_url":"https://codeload.github.com/pagyew/safolor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243769947,"owners_count":20345215,"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":["colors","converter","utils","web-safe"],"created_at":"2024-11-21T14:57:58.291Z","updated_at":"2025-03-15T17:44:27.082Z","avatar_url":"https://github.com/pagyew.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @pagyew/safolor\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![JSDocs][jsdocs-src]][jsdocs-href]\n[![License][license-src]][license-href]\n\nConvert colors to 8-bit web-safe colors\n\n\u003e This package is designed to be used as `devDependencies` and bundled into your dist.\n\n## Installation\n\n```\nnpm i @pagyew/safolor\n```\n\n## Usage\n\n```ts\nimport { safolor } from '@pagyew/safolor'\n```\n\n### `safolor(color: HEX | RGB): HEX`\n\nShortcut for `safolor.hex()`\n\n### `.hex(color: HEX | RGB): HEX`\n\nAccepts a color in HEX or RGB format and returns a safecolor in HEX format\n\n```ts\nsafolor.hex('#123456') // #003366\n```\n\n### `.rgb(color: HEX | RGB): RGB`\n\nAccepts a color in HEX or RGB format and returns a safecolor in RGB format\n\n```ts\nsafolor.rgb('#123456') // rgb(0, 51, 102)\n```\n\n### `.rgbObj(color: HEX | RGB): RGBObject`\n\nAccepts a color in HEX or RGB format and returns a safecolor's values in RGB object\n\n```ts\nsafolor.rgbObj('#123456') // { r: 0, g: 51, b: 102 }\n```\n\n## License\n[MIT](./LICENSE) License © 2024-PRESENT [Vladislav Tsepilov](https://github.com/pagyew)\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/@pagyew/safolor?style=flat\u0026colorA=000033\u0026colorB=6699cc\n[npm-version-href]: https://npmjs.com/package/@pagyew/safolor\n[npm-downloads-src]: https://img.shields.io/npm/dm/@pagyew/safolor?style=flat\u0026colorA=003300\u0026colorB=99cc66\n[npm-downloads-href]: https://npmjs.com/package/@pagyew/safolor\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/@pagyew/safolor?style=flat\u0026colorA=330000\u0026colorB=cc6699\u0026label=minzip\n[bundle-href]: https://bundlephobia.com/result?p=@pagyew/safolor\n[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat\u0026colorA=003333\u0026colorB=669999\n[jsdocs-href]: https://www.jsdocs.io/package/@pagyew/safolor\n[license-src]: https://img.shields.io/github/license/pagyew/safolor.svg?style=flat\u0026colorA=333300\u0026colorB=999966\n[license-href]: https://github.com/pagyew/safolor/blob/main/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpagyew%2Fsafolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpagyew%2Fsafolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpagyew%2Fsafolor/lists"}