Crates.io | coolor |
lib.rs | coolor |
version | 1.0.0 |
source | src |
created_at | 2021-11-10 19:12:21.760404 |
updated_at | 2024-08-12 08:47:00.61327 |
description | conversion between color formats |
homepage | |
repository | https://github.com/Canop/coolor |
max_upload_size | |
id | 479867 |
size | 216,091 |
Definition of ANSI, RGB and HSL color types and all the conversions between them.
There are many other color conversion crates. This one is no-std and pure-rust and may be useful when you're interested into
Coolor is used in SafeCloset to dynamically fade the background behind a dialog:
Be warned that the ANSI range is intrinsically limited to 240 colors and that not all intuitive operations will give good results.
Coolor doesn't contain functions to print on the terminal, but the colors can be used in other crates. There's an optional feature for conversion from and into Crossterm colors. You'll see it used in the included examples.
Luminosity and saturation variations of all 240 ANSI colors, with all variants still ANSI colors.
Several ways to mix colors
Finding the nearest ANSI color from a RGB one