{"id":18224904,"url":"https://github.com/iamsebastiandev/colrjs","last_synced_at":"2025-07-10T02:33:59.089Z","repository":{"id":229637361,"uuid":"634452790","full_name":"IamSebastianDev/ColrJS","owner":"IamSebastianDev","description":"ColrJS","archived":false,"fork":false,"pushed_at":"2023-05-22T16:51:36.000Z","size":4044,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-04-08T03:44:38.913Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"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/IamSebastianDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license.md","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":"2023-04-30T06:56:13.000Z","updated_at":"2024-03-25T13:04:27.000Z","dependencies_parsed_at":"2024-03-25T15:48:23.115Z","dependency_job_id":"d505526d-7895-4a4b-aeff-9a0bcfb5b04f","html_url":"https://github.com/IamSebastianDev/ColrJS","commit_stats":null,"previous_names":["iamsebastiandev/colrjs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IamSebastianDev/ColrJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2FColrJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2FColrJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2FColrJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2FColrJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IamSebastianDev","download_url":"https://codeload.github.com/IamSebastianDev/ColrJS/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamSebastianDev%2FColrJS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264519716,"owners_count":23621857,"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":[],"created_at":"2024-11-04T02:04:54.821Z","updated_at":"2025-07-10T02:33:59.040Z","avatar_url":"https://github.com/IamSebastianDev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- @format --\u003e\n\n# ColrJS\n\n[![Npm package version](https://badgen.net/npm/v/colrjs)](https://www.npmjs.com/package/colrjs)[![Npm package total downloads](https://badgen.net/npm/dt/colrjs)](https://npmjs.com/package/colrjs)[![Npm package license](https://badgen.net/npm/license/colrjs)](https://npmjs.com/package/colrjs)[![Github tag](https://badgen.net/github/tag/ZktSn0w/ColrJS)](https://github.com/ZktSn0w/ColrJS/tags)\n\nA lightweight, modern, extendable Color Palette extractor that can be used in the browser or in a node.js context.\n\n## Installing\n\nTo use **ColrJS** with node and/or a bundler such as webpack or rollup, install it via yarn or npm:\n\n```bash\nyarn add colrjs\n# or use npm\nnpm install colrjs\n```\n\nYou can also use it directly in the browser and include it via CDN or locally.\n\n```html\n\u003chead\u003e\n    ...\n    \u003c!-- as a local file --\u003e\n    \u003cscript src=\"./your/path/to/colrjs.browser.min.js\"\u003e\u003c/script\u003e\n    \u003c!-- or via CDN --\u003e\n    \u003cscript src=\"http://unpkg.com/colrjs\"\u003e\u003c/script\u003e\n    ...\n\u003c/head\u003e\n```\n\n## Getting started\n\nSetting up the initial **ColrJS** instance is quick and requires only a configuration object. **ColrJS** provides functions to create one, to utilize editor autocompletion and type safety. For a more in depth guide on how to use **ColrJS**, take a look at the full [documentation](./docs/readme.md).\n\nStart by importing or destructuring the required methods. You are free to use module or import syntax, **ColrJS** provides export for both standards. When included via CDN or locally, destructuring the globally accessible `ColrJS` property is the easiest way to access the API.\n\n```js\n// node require syntax\nconst { ColrJS, defineConfig } = require('colrjs');\n\n// modern es6 style syntax\nimport { ColrJS, defineConfig } from 'colrjs';\n\n// if added to the global namespace\nconst { ColrJS, defineConfig } = ColrJS;\n```\n\n### Creating a `ColrJS` instance\n\nTo use **ColrJS**, create a new instance and pass a configuration object containing a Processor to it as parameters.\n\n\u003e Note: The examples below assumes you're using es6.\n\n```ts\nimport { defineConfig, ColrJS, Monochromatic } from 'colrjs';\n\n// create a processor configuration\nconst config = defineConfig({\n    processors: {\n        mono: Monochromatic(5),\n    },\n});\n\nconst colr = new ColrJS(config);\n\n// You can now extract a Palette by using the extract Palette method.\nconst monochromaticPalette = await colr.extractPalette(\u003cpixelArray\u003e).mono();\n```\n\n## Contributing\n\nIf you would like to contribute, take a look at the [contribution guide](./contributing.md).\n\n## License\n\n**Vay** is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsebastiandev%2Fcolrjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamsebastiandev%2Fcolrjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsebastiandev%2Fcolrjs/lists"}