{"id":26054591,"url":"https://github.com/twhy/shadcn-color-picker","last_synced_at":"2025-10-28T17:16:23.710Z","repository":{"id":280042374,"uuid":"940826800","full_name":"twhy/shadcn-color-picker","owner":"twhy","description":"shadcn color picker","archived":false,"fork":false,"pushed_at":"2025-03-11T12:45:58.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T09:56:43.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://shadcn-color-picker-sigma.vercel.app","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/twhy.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":"2025-02-28T21:39:22.000Z","updated_at":"2025-03-11T12:46:01.000Z","dependencies_parsed_at":"2025-03-01T00:04:08.983Z","dependency_job_id":"91e89ade-5b6a-459b-94ec-3754f92a07ed","html_url":"https://github.com/twhy/shadcn-color-picker","commit_stats":null,"previous_names":["twhy/shadcn-color-picker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/twhy/shadcn-color-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhy%2Fshadcn-color-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhy%2Fshadcn-color-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhy%2Fshadcn-color-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhy%2Fshadcn-color-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twhy","download_url":"https://codeload.github.com/twhy/shadcn-color-picker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twhy%2Fshadcn-color-picker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281477727,"owners_count":26508369,"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-10-28T02:00:06.022Z","response_time":60,"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":[],"created_at":"2025-03-08T09:11:54.851Z","updated_at":"2025-10-28T17:16:23.679Z","avatar_url":"https://github.com/twhy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shadcn Color Picker\n\n## Preview\nhttps://shadcn-color-picker-sigma.vercel.app/\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\n## Usage\n\n```tsx\n// app/page.tsx\nimport { useMemo, useState } from \"react\";\nimport {\n  ColorPicker,\n  type HexColor,\n  hexToHSLA,\n} from \"@/components/ui/color-picker\";\n\nexport default function Home() {\n  const [color, setColor] = useState\u003cHexColor\u003e(\"#00ffff\");\n  const hsla = useMemo(() =\u003e hexToHSLA(color), [color]);\n\n  return (\n    \u003cmain className=\"flex min-h-screen flex-col items-center justify-center p-24 bg-gray-100\"\u003e\n      \u003cColorPicker color={color} onChange={setColor} /\u003e\n      \u003cdiv className=\"mt-4 flex items-center justify-center gap-3\"\u003e\n        \u003cspan\n          className=\"size-4 rounded-full\"\n          style={{ backgroundColor: color }}\n        /\u003e\n        \u003cspan className=\"text-gray-600 tracking-wide font-mono font-medium uppercase\"\u003e\n          {color}\n        \u003c/span\u003e\n        \u003cspan className=\"text-gray-600 tracking-wide font-mono font-medium uppercase\"\u003e\n          {Math.round(hsla.a * 100)}%\n        \u003c/span\u003e\n      \u003c/div\u003e\n    \u003c/main\u003e\n  );\n}\n```\n\n## Customization\nJust copy the code from `components/ui/color-picker.tsx` and change the styles to your liking.\n\n## Screenshot\n![WX20250303-012107@2x](https://github.com/user-attachments/assets/9d3de286-fddf-4005-915c-f86081e1d99b)\n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwhy%2Fshadcn-color-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwhy%2Fshadcn-color-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwhy%2Fshadcn-color-picker/lists"}