{"id":16990824,"url":"https://github.com/blenderskool/pigmnts","last_synced_at":"2025-03-15T14:30:44.029Z","repository":{"id":35156220,"uuid":"214174083","full_name":"blenderskool/pigmnts","owner":"blenderskool","description":"🎨 Color palette generator from an image using WebAssesmbly and Rust","archived":false,"fork":false,"pushed_at":"2023-03-24T23:44:44.000Z","size":336,"stargazers_count":75,"open_issues_count":15,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T07:49:42.997Z","etag":null,"topics":["color-palette","color-quantization","kmeans","pigments","rust","wasm","web-assembly"],"latest_commit_sha":null,"homepage":"https://pigmnts.web.app","language":"Rust","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/blenderskool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2019-10-10T12:14:28.000Z","updated_at":"2025-01-31T17:10:23.000Z","dependencies_parsed_at":"2024-10-02T01:30:27.317Z","dependency_job_id":"71d56d26-cb9a-4f1c-beba-39a9879e9a16","html_url":"https://github.com/blenderskool/pigmnts","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":0.0714285714285714,"last_synced_commit":"ba7ceb4b7bef864dff14d396b4c5ec6fd40f2e49"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Fpigmnts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Fpigmnts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Fpigmnts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blenderskool%2Fpigmnts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blenderskool","download_url":"https://codeload.github.com/blenderskool/pigmnts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243742626,"owners_count":20340676,"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-palette","color-quantization","kmeans","pigments","rust","wasm","web-assembly"],"created_at":"2024-10-14T03:23:50.372Z","updated_at":"2025-03-15T14:30:43.584Z","avatar_url":"https://github.com/blenderskool.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎨 Pigmnts\nPigmnts is a color palette creator from an image built using Rust. It uses the [K-means++](https://en.wikipedia.org/wiki/K-means%2B%2B) clustering algorithm to select the most commonly occurring colors from the image.\n\n**Pigmnts library** is compiled to WebAssembly which allows for super-fast color palette extraction from an image on the web.\nThe library can be found in the `lib` directory.\n\n## Pigmnts CLI\nPigmnts CLI is a tool designed to create color palettes from an image right on your terminal. It supports various image formats like `JPEG`, `PNG`, `GIF`, `WebP`, `TIFF` along with external HTTP(S) image URLs. It provides a beautiful terminal output to preview the colors in the palette.\n\nPigmnts CLI comes with various output modes and provides on-demand data of the palette generated while maintaining high speeds.\n\n### Installing the CLI\nCLI can be installed using `cargo` and `pigmnts-cli` crate on crates.io\n```bash\ncargo install pigmnts-cli\n```\n\n\n### Output modes\n\n#### Default mode\nThe default mode displays the palette in a user-friendly way with a small preview and corresponding color codes in a tabular structure. This is meant for the common use of the CLI.\n\n![](https://user-images.githubusercontent.com/21107799/77250424-f112d600-6c6d-11ea-82ef-4ebb32d86ee0.png)\n\n### Quiet (or Silent) mode\nThis mode displays only the essential output without the intermediate logs. The output is in plain text format with each data item separated by `:`. This is meant for use in a pipeline where the output of the CLI is used as input for another process. It can be activated by the `-q or --quiet` flag.\n\n![](https://user-images.githubusercontent.com/21107799/77250518-801fee00-6c6e-11ea-9086-b077447fd4d1.png)\n\n\n### Flags and options in the CLI\nThe following flags and options are supported by the latest release of the CLI.\n```\nFLAGS:\n    -d, --dominance    Enable dominance percentage of colors\n    -h, --help         Prints help information\n    -x, --hex          Enable Hex code output of colors\n    -s, --hsl          Enable HSL output of colors\n    -l, --lab          Enable L*AB output of colors\n    -q, --quiet        Suppress the normal output [aliases: silent]\n    -r, --rgb          Enable RGB output of colors\n    -n, --name         Nearest name for the color\n    -V, --version      Prints version information\n\nOPTIONS:\n    -c, --count \u003cCOUNT\u003e...    Number of colors in the palette\n```\n\n#### Examples of these flags\n\n- `pigmnts pic-1.jpg -c 5 pic-2.jpg -c 8`  \n  Generate a palette of 5 colors from pic-1.jpg and 8 colors from pic-2.jpg.\n\n- `pigmnts pic-1.jpg -rxdl`  \n  Generate a palette of 5 colors from pic-1.jpg and show the RGB code, hex code, dominance, LAB code for each color in the palette.\n\n- `pigmnts pic-1.jpg --count 10 --name --hex`  \n  Generate a palette of 10 colors from pic-1.jpg and show the name, hex code for each color in the palette.\n\n- `pigmnts pic-1.jpg pic-2.jpg -sxq`  \n  Generate a palette of 5 colors from pic-1.jpg and pic-2.jpg. For each color in the palette show the HSL code, hex code in `quiet` mode.\n\n\n\n## Contributing\nThis repository is a Cargo workspace that includes the development of both core Pigmnts library and the CLI.\n\n### Project Structure\n- **Pigmnts Library** - development of the core library is in the `lib` directory.\n- **Pigmnts CLI** - root project is Pigmnts CLI that uses the Pigmnts library.\n\n\n## License\nPigmnts is [MIT Licensed](https://github.com/blenderskool/pigmnts/blob/master/LICENSE.md)  \nThe dataset for color names used in Pigmnts CLI is taken from https://github.com/meodai/color-names","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblenderskool%2Fpigmnts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblenderskool%2Fpigmnts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblenderskool%2Fpigmnts/lists"}