{"id":17602382,"url":"https://github.com/randplus/color","last_synced_at":"2026-02-01T20:03:11.009Z","repository":{"id":257817391,"uuid":"870456726","full_name":"randplus/color","owner":"randplus","description":"A package that adds functions for random.","archived":false,"fork":false,"pushed_at":"2025-09-01T01:42:57.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-01T10:54:27.693Z","etag":null,"topics":["color","hex","name","nodejs","npm","package","random","rgb"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@randplus/color","language":"JavaScript","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/randplus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T04:38:47.000Z","updated_at":"2025-09-01T01:43:00.000Z","dependencies_parsed_at":"2025-03-09T00:31:48.427Z","dependency_job_id":"7e1c43df-6e87-4a54-a7cb-aabd9c39f396","html_url":"https://github.com/randplus/color","commit_stats":null,"previous_names":["otoneko1102/randplus-color","randplus/color"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/randplus/color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randplus%2Fcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randplus%2Fcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randplus%2Fcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randplus%2Fcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/randplus","download_url":"https://codeload.github.com/randplus/color/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/randplus%2Fcolor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28988419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T18:17:03.387Z","status":"ssl_error","status_checked_at":"2026-02-01T18:16:57.287Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["color","hex","name","nodejs","npm","package","random","rgb"],"created_at":"2024-10-22T13:08:04.405Z","updated_at":"2026-02-01T20:03:11.004Z","avatar_url":"https://github.com/randplus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @randplus/color\nGenerate random colors.\u003cbr\u003e\nThis package is included in '[randplus](https://www.npmjs.com/package/randplus)'.\n\n###### Teams\n\u003cimg src=\"https://raw.githubusercontent.com/randplus/docs/main/img/randplus.png\" alt=\"OTONEKO.CAT\" style=\"display: block; width: auto; height: 100px;\"/\u003e\n\n## Usage\n```js\n// Classic\nconst random = require('@randplus/color');\n\nconsole.log(random('hex')); // '000000' ~ 'ffffff'\nconsole.log(random('hex', { prefix: '#' })); // '#000000' ~ '#ffffff'\nconsole.log(random('rgb')); // [0, 0, 0] ~ [255, 255, 255]\nconsole.log(random('word')); // 'limegreen'\nconsole.log(random('word', { language: 'ja' })); // '鉄色'\n```\n```js\n// Advanced\nconst { hex, rgb, word } = require('@randplus/color');\n\nconsole.log(hex()); // '000000' ~ 'ffffff'\nconsole.log(hex('#')); // '#000000' ~ '#ffffff'\nconsole.log(rgb()); // [0, 0, 0] ~ [255, 255, 255]\nconsole.log(word()); // 'limegreen'\nconsole.log(word('cn')); // '紫磨金'\n```\n\n### Get Color Name Example:\nInstall [color-name-lib](https://www.npmjs.com/package/color-name-lib).\n```sh\nnpm i color-name-lib\n```\n```js\nconst { hex } = require('@randplus/color');\nconst colorName = require('color-name-lib');\n\nconst colorHex = hex();\nconst name = colorName(colorHex);\nconsole.log(`${colorHex}: ${name}`);\n```\nor use `lib/color-name-lib.js`.\n```js\nconst { hex } = require('@randplus/color');\nconst colorName = require('@randplus/color/lib/color-name-lib');\n\nconst colorHex = hex();\nconst name = colorName(colorHex);\nconsole.log(`${colorHex}: ${name}`);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandplus%2Fcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandplus%2Fcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandplus%2Fcolor/lists"}