Crate random_color

source ·
Expand description

Rust crate for generating random attractive colors. Inspired by RandomColor.

Usage

use random_color::color_dictionary::{ColorDictionary, ColorInformation};
use random_color::{Color, Luminosity, RandomColor};

let color = RandomColor::new()
  .hue(Color::Blue) // Optional
  .luminosity(Luminosity::Light) // Optional
  .seed(42) // Optional
  .alpha(1.0) // Optional
  .dictionary(ColorDictionary::new())
  .to_hsl_string(); //

// color => "hsl(179, 99%, 10%)"

Modules

Structs

Enums

Traits