2 unstable releases
0.4.0 | Jun 7, 2024 |
---|---|
0.3.0 | May 19, 2024 |
#74 in Images
307 downloads per month
265KB
6.5K
SLoC
auto-palette-cli
A CLI tool to extract color palettes from images using the
auto-palette
crate.
Usage
A CLI tool to extract prominent colors from images.
Usage: auto-palette [OPTIONS] <PATH>
Arguments:
<PATH> Path to the image file.
Options:
-a, --algorithm <name> Algorithm for extracting the color palette. [default: dbscan] [possible values: dbscan, dbscan++, kmeans]
-t, --theme <name> Theme for selecting the swatches. [possible values: basic, vivid, muted, light, dark]
-n, --count <number> Number of colors to extract. [default: 5]
-c, --color <name> Output color format. [default: hex] [possible values: hex, rgb, hsl, hsv, lab, luv, lchab, lchuv, oklab, oklch, xyz]
-o, --output <name> Output format. [default: text] [possible values: text, table]
--no-resize Disable image resizing before extracting the color palette.
-h, --help Print help (see more with '--help')
-V, --version Print version
Examples
$ auto-palette path/to/your_image.jpg -n 6 -c rgb -o table
+---+--------------------+------------+------------+
| # | Color | Position | Population |
+---+--------------------+------------+------------+
| 1 | RGB(221, 226, 222) | (104, 96) | 6778 |
| 2 | RGB(3, 144, 149) | (114, 201) | 5476 |
| 3 | RGB(23, 37, 36) | (120, 300) | 4300 |
| 4 | RGB(36, 88, 131) | (183, 145) | 1348 |
| 5 | RGB(254, 29, 44) | (183, 190) | 779 |
| 6 | RGB(253, 213, 116) | (25, 158) | 567 |
+---+--------------------+------------+------------+
Development
cargo run -- {image_path}
License
Licensed under the MIT license. See LICENSE for more information.
Dependencies
~15MB
~126K SLoC