Crate random_color
source ·Expand description
A library for generating attractive random colors with a variety of options. Inspired by randomColor.
§Examples
use random_color::RandomColor;
let mut random_color = RandomColor::new();
let color = random_color.to_hex();
println!("{}", color);
use random_color::RandomColor;
use random_color::options::{Gamut, Luminosity};
let mut random_color = RandomColor{
hue: Some(Gamut::Blue),
luminosity: Some(Luminosity::Dark),
..Default::default()
};
let color = random_color.to_hsl_string();
println!("{}", color);
use random_color::RandomColor;
let mut random_color = RandomColor::new();
random_color.seed("A random seed");
let color = random_color.to_rgb_string();
println!("{}", color);
Modules§
Structs§
- A structure for generating random colors with a variety of options.