| Crates.io | dominant-colours |
| lib.rs | dominant-colours |
| version | 0.2.0 |
| created_at | 2025-01-10 21:14:48.58335+00 |
| updated_at | 2025-01-12 02:53:56.38737+00 |
| description | Extract dominant colours from images using k-means clustering |
| homepage | |
| repository | https://github.com/llaisdy/dominant-colours |
| max_upload_size | |
| id | 1511747 |
| size | 42,202 |
A command line tool that extracts dominant colours from images using k-means clustering. Unlike simpler color quantization algorithms, this tool uses machine learning to find natural color clusters and reports their prevalence in the image.
cargo install --path .
# Basic usage - prints RGB values
dominant-colours image.jpg
# Specify number of colors to extract
dominant-colours -c 8 image.jpg
# Generate a color swatch
dominant-colours --swatch image.jpg
# Specify swatch output file
dominant-colours -s -o my-colors.svg image.jpg