rand_hsv
Generate random hsva(...) colors with configurable bounds.
Install
Optional serde support:
Quick start
use random_hsv;
let color = random_hsv;
let formatted = color.to_hsva_string;
assert!;
assert!;
Custom ranges
use ;
let range = new.unwrap;
let color = random_hsv_in.unwrap;
assert!;
assert!;
Seeded deterministic generation
use StdRng;
use SeedableRng;
use random_hsv_with_rng;
let mut rng_a = seed_from_u64;
let mut rng_b = seed_from_u64;
assert_eq!;
Caveats
- Values are sampled from numeric component ranges; they are not gamut-checked, contrast-checked, palette-aware, or perceptually uniform.
hsva(...)is a stable crate compatibility format, not a browser-CSS guarantee.