{"id":15486384,"url":"https://github.com/ianfabs/cs-rcg","last_synced_at":"2026-04-11T18:05:49.135Z","repository":{"id":56242351,"uuid":"238139576","full_name":"ianfabs/cs-rcg","owner":"ianfabs","description":"A small, and fast random color generator. Generates hex, hsl, hsla, rgb, and rgba colors (and also hex-alpha).","archived":false,"fork":false,"pushed_at":"2020-11-19T23:39:59.000Z","size":29,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-22T18:03:43.633Z","etag":null,"topics":["cli","colors","deno","javascript","node","rgba","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ianfabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-04T06:33:35.000Z","updated_at":"2020-11-19T23:40:01.000Z","dependencies_parsed_at":"2022-08-15T15:20:25.999Z","dependency_job_id":null,"html_url":"https://github.com/ianfabs/cs-rcg","commit_stats":null,"previous_names":["ianfabs/rcg"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ianfabs/cs-rcg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfabs%2Fcs-rcg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfabs%2Fcs-rcg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfabs%2Fcs-rcg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfabs%2Fcs-rcg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ianfabs","download_url":"https://codeload.github.com/ianfabs/cs-rcg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianfabs%2Fcs-rcg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269365510,"owners_count":24405229,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":["cli","colors","deno","javascript","node","rgba","typescript"],"created_at":"2024-10-02T06:08:07.390Z","updated_at":"2026-04-11T18:05:49.094Z","avatar_url":"https://github.com/ianfabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/ianfabs/rcg) ![Node.js Package](https://github.com/ianfabs/rcg/workflows/Node.js%20Package/badge.svg?event=release)\n\n# CS-RCG\n#### *Cryptographically-Secure Random Color Generator*\n\nA tiny, and fast random color generator. Generates hex, rgb, and hsl colors (Optionally with alpha-values). I got the idea from my implementation of nanoid for Deno. The way the random values are generated ensures (mostly) true randomness. I also like using/learning new Web APIs, and Web Crypto is pretty cool.\n\n# Usage\n\n## Code\n```ts\nimport {hex, rgb, hsl} from \"https://deno.land/x/cs-rcg/mod.ts\";\n\nhex() // 1b69af\nhex(true) // 1b69af91\n\nrgb() // [12, 102, 67]\nrgb(true) // [12, 102, 67, 0.32]\n\nhsl() // [217, 48.12, 91.55]\nhsl(true) // [217, 48.12%, 91.55%, 0.78]\n\n// You get the idea...\n```\n\n## CLI\nRCG offers a simple cli for generating colors too.\n\n### Installation\n\n```sh\n$ deno install --allow-read --name rcg https://deno.land/x/cs-rcg/cli.ts\n```\n\n### Usage\n\n```sh\n$ rcg\n3c5f67\n```\n\n```sh\n$ rcg hsl -fa\nhsl(161, 28%, 71%, 0.53)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianfabs%2Fcs-rcg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianfabs%2Fcs-rcg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianfabs%2Fcs-rcg/lists"}