{"id":19044135,"url":"https://github.com/supitsdu/colorus-js","last_synced_at":"2025-04-23T23:27:11.946Z","repository":{"id":226691459,"uuid":"769400793","full_name":"supitsdu/colorus-js","owner":"supitsdu","description":"🎨 Colorus.js: Your extensible, type-safe color library.","archived":false,"fork":false,"pushed_at":"2025-03-24T12:36:45.000Z","size":484,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T12:17:38.339Z","etag":null,"topics":["color-conversion","color-manipulation","colorus","streamlined-interface","type-safe-api","typescript-library","wcag-contrast"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/colorus-js","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/supitsdu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"publiccode":null,"codemeta":null}},"created_at":"2024-03-09T01:19:50.000Z","updated_at":"2024-12-30T00:46:10.000Z","dependencies_parsed_at":"2024-04-01T02:47:17.112Z","dependency_job_id":"d23360d7-fc22-4d27-b418-1f7bb27541f3","html_url":"https://github.com/supitsdu/colorus-js","commit_stats":null,"previous_names":["supitsdu/colorus"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supitsdu%2Fcolorus-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supitsdu%2Fcolorus-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supitsdu%2Fcolorus-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supitsdu%2Fcolorus-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supitsdu","download_url":"https://codeload.github.com/supitsdu/colorus-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250530885,"owners_count":21445883,"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":["color-conversion","color-manipulation","colorus","streamlined-interface","type-safe-api","typescript-library","wcag-contrast"],"created_at":"2024-11-08T22:44:59.887Z","updated_at":"2025-04-23T23:27:11.926Z","avatar_url":"https://github.com/supitsdu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Colorus.js\n\n**Colorus.js** is a flexible color manipulation library with multi-format support and TypeScript compatibility.\n\n## Features\n\n- 🌈 **Model-Agnostic Design** – Supports HEX, RGB, HSL, HSV, CMYK, and is extendable to any color model.\n- ⚡️ **Effortless Chaining** – Chain transformations with seamless TypeScript support for clarity and reliability.\n- 🧩 **Extensible by Design** – Add custom parsers and plugins to unlock new models and functions.\n- 🔒 **Solid Type Safety** – Robust TypeScript types deliver consistent, predictable color transformations.\n\n## Quick Start\n\n```javascript\nimport { dye } from \"colorus-js\"\n\nconst color = dye(\"rgb(255 0 0)\")\n\nconsole.log(color.hsl) // { h: 0, s: 100, l: 50, a: 1 }\nconsole.log(color.luminance) // 0.21\nconsole.log(color.source.isValid) // true\nconsole.log(color.source.model) // \"rgb\"\n```\n\n### Multi-Format Support\n\n```javascript\nimport { dye, hslParser } from \"colorus-js\"\n\nconst color = dye(\"hsl(120deg 50% 30%)\", { parsers: [hslParser] })\n\nconsole.log(color.luminance) // 0.13\nconsole.log(color.rgb) // { r: 38.25, g: 114.75, b: 38.25, a: 1 }\n```\n\n**Built-in Parsers:** `cmykParser`, `hexParser`, `hslParser`, `hsvParser`, `rgbParser` (default)\n\n### Custom Plugins\n\n```javascript\nimport { createPlugin, dye } from \"colorus-js\"\n\n// Custom grayscale plugin definition\nconst grayscale = createPlugin(\"grayscale\", function () {\n  const avg = (this.rgb.r + this.rgb.g + this.rgb.b) / 3\n  return dye({ r: avg, g: avg, b: avg, a: this.rgb.a }, this.options)\n})\n\n// Usage\nconst color = dye(\"rgb(255, 0, 0)\", { plugins: { grayscale } })\n\nconsole.log(color.grayscale().rgb) // { r: 85, g: 85, b: 85, a: 1 }\n```\n\n**Built-in Plugins:** `invert`, `lighten`, `darken`, `saturate`, `desaturate`, `toCmyk`, `toHex`, `toHsl`, `toHsv`, `toRgb`\n\n## Further Reading\n\n- [API Reference](docs/API.md)\n- [Working with Plugins](docs/guide/WORKING_WITH_PLUGINS.md)\n- [Working with Parsers](docs/guide/WORKING_WITH_PARSERS.md)\n\n## Contributing\n\nContributions are welcome! See the [Contributing Guide](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupitsdu%2Fcolorus-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupitsdu%2Fcolorus-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupitsdu%2Fcolorus-js/lists"}