{"id":30508341,"url":"https://github.com/valentin-marquez/pix","last_synced_at":"2026-06-29T11:31:53.414Z","repository":{"id":221912217,"uuid":"755771067","full_name":"valentin-marquez/pix","owner":"valentin-marquez","description":"🎨 Pix is a Node.js library for extracting dominant colors from images.","archived":false,"fork":false,"pushed_at":"2024-09-04T00:17:15.000Z","size":56427,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T22:42:41.890Z","etag":null,"topics":["color-palette","image-processing","predominant-colors"],"latest_commit_sha":null,"homepage":"","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/valentin-marquez.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"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-02-11T01:55:51.000Z","updated_at":"2024-04-14T22:18:46.000Z","dependencies_parsed_at":"2024-02-19T18:52:52.741Z","dependency_job_id":null,"html_url":"https://github.com/valentin-marquez/pix","commit_stats":null,"previous_names":["valentin-marquez/pix"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/valentin-marquez/pix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin-marquez%2Fpix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin-marquez%2Fpix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin-marquez%2Fpix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin-marquez%2Fpix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valentin-marquez","download_url":"https://codeload.github.com/valentin-marquez/pix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valentin-marquez%2Fpix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34925718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"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":["color-palette","image-processing","predominant-colors"],"created_at":"2025-08-25T22:35:54.964Z","updated_at":"2026-06-29T11:31:53.398Z","avatar_url":"https://github.com/valentin-marquez.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @babidi/pix\n\nA library to process images and extract dominant color and palette.\n\n## Installation\n\nYou can install the library via npm or yarn:\n\n```bash\nnpm install @babidi/pix\n```\n\nor\n\n```bash\nyarn add @babidi/pix\n```\n\n## Usage\n\nHere's an example of how you can use `@babidi/pix` to extract the predominant color and palette from an image:\n\n```javascript\nimport Pix from '@babidi/pix';\nimport * as fs from 'fs';\n\nconst imageBuffer = fs.promises.readFile('path_to_your_image.jpg');\nconst image = new Pix(imageBuffer, Pix.Format.JPG);\nconsole.log('Dominant Color:', image.dominant.toHex());\nconsole.log('Palette:', image.palette.toHex());\n```\n\nReplace `'path_to_your_image.jpg'` with the path to the image file you want to process.\n\n## Benchmark\n\nA benchmark was conducted comparing the performance of `@babidi/pix` with another popular library called ColorThief in extracting the dominant color and color palette from different types of image files. Times are shown in milliseconds (ms).\n\n| File Type | Pix (ms) | ColorThief (ms) |\n|-----------|----------|-----------------|\n| PNG       | 274      | 2325            |\n| JPEG      | 309      | 3781            |\n| GIF       | 262      | 237             |\n| BMP       | 122      | No Supported    |\n| WEBP      | 726      | No Supported    |\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\nFor bug reporting and feature requests, please use the [issues](https://github.com/valentin-marquez/pix/issues) section of the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentin-marquez%2Fpix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalentin-marquez%2Fpix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalentin-marquez%2Fpix/lists"}