4 releases
0.2.1 | Jun 13, 2023 |
---|---|
0.2.0 | Jun 13, 2023 |
0.1.1 | Jun 8, 2023 |
0.1.0 | Jun 8, 2023 |
#14 in #cli-color
11KB
158 lines
Huey
Huey is a CLI tool for colorizing images with a specified palette. Instead of using specialized tools to colorize images with a specific palette (e.g. Catppuccin, Srcery, etc.) you can just use huey path-to-image path-to-palette
!
Installation
Note: Huey requires Rust Nightly
You can install huey
by using cargo:
$ cargo install huey
Usage
$ huey <IMAGE_PATH> <PALETTE_PATH> [OUTPUT_PATH] [OPTIONS]
Check the program's help for more information.
$ huey --help
Options
Huey has a variety of options available:
-o
: Output path. (default=colorized.png)-i
: Interpolation mode. You can use eitherinterpolation
ormix
. If you specify this option the 2 closest colors to a given pixel's color will be picked and mixed. In theinterpolation
mode Huey will take the middle point between those 2 colors, and in themix
mode it will take a bigger proportion of the closest one according tod1 / (d1 + d2)
, whered1
is the distance to the closest color andd2
is the distance to the second closest color.-r
: Use RGB. (uses OKLAB by default)-m
: Mix strength. How much of the original color you want to replace. 0 leaves the original color, while 1 replaces it completely. (default=1)-s
: Saturation. If you don't specify any value then the original saturation will be used.
Palettes
Palette files are simply text files containing the palette's colors in RGB hex format (i.e. #77FF00
, although the pad symbol is optional).
An example palette could be:
#000000 #121212
#0066FF #00FF66
#77FF00
You can store your palettes wherever you want, but I recommend having them in a directory like ~/.huey
License
This tool is made available under the Apache License, Version 2.
Dependencies
~10MB
~157K SLoC