cliris

Crates.iocliris
lib.rscliris
version0.2.0
sourcesrc
created_at2022-07-31 11:59:20.303047
updated_at2022-08-31 15:52:36.042023
descriptionA cli tool that creates color palettes from images using the median cut algorithm.
homepagehttps://github.com/Kaesebrot84/iris
repositoryhttps://github.com/Kaesebrot84/iris
max_upload_size
id636110
size553,338
hewhocopypastes (Kaesebrot84)

documentation

README

Iris

Rust crates.io

A command line tool that creates color palettes from images using the median cut algorithm.

Usage

$ cliris --help
cliris 0.2.0
Andrej G. <REDACTED@gmail.com>
A cli tool that creates color palettes from images using the median cut algorithm.

USAGE:
    cliris [OPTIONS] --file-name <FILE_NAME> [OUTPUT_FORMAT]

ARGS:
    <OUTPUT_FORMAT>    Desired data file format to be written [default: none] [possible values:
                       none, html, json, csv]

OPTIONS:
    -f, --file-name <FILE_NAME>          Target image file name
    -h, --help                           Print help information
    -i, --iterations <ITERATIONS>        Number of iterations [default: 1]
    -o, --out-filename <OUT_FILENAME>    File path the file should be written to [default: palette]
    -V, --version                        Print version information

Installation

cargo install cliris

Example

$ cliris -f peppers.png -i 3 html

Generating palette...
Finished generating palette in 75 ms.

{ R: 191, G: 207, B: 141, A: 255 }
{ R: 139, G: 187, B: 108, A: 255 }
{ R: 171, G: 185, B: 76, A: 255 }
{ R: 118, G: 159, B: 71, A: 255 }
{ R: 197, G: 60, B: 50, A: 255 }
{ R: 186, G: 41, B: 34, A: 255 }
{ R: 117, G: 77, B: 45, A: 255 }
{ R: 78, G: 7, B: 6, A: 255 }

example_output_image

Library

This project uses the iris-lib crate, which performs this algorithm as a stand-alone library.

Commit count: 25

cargo fmt