Stand With Ukraine

Huey

Crates.io Crates.io GitHub Repo stars

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:

bash $ cargo install huey

Usage

bash $ huey <IMAGE_PATH> <PALETTE_PATH> [OUTPUT_PATH] [OPTIONS]

Check the program's help for more information. bash $ huey --help

Options

Huey has a variety of options available: - -o: Output path. (default=colorized.png) - -i: Interpolation mode. You can use either interpolation or mix. If you specify this option the 2 closest colors to a given pixel's color will be picked and mixed. In the interpolation mode Huey will take the middle point between those 2 colors, and in the mix mode it will take a bigger proportion of the closest one according to d1 / (d1 + d2), where d1 is the distance to the closest color and d2 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.