rand_lab
Generate random lab(...) colors with configurable bounds.
Install
Optional serde support:
Quick start
use random_lab;
let color = random_lab;
let formatted = color.to_lab_string;
assert!;
assert!;
Custom ranges
use ;
let range = new.unwrap;
let color = random_lab_in.unwrap;
assert!;
assert!;
Seeded deterministic generation
use StdRng;
use SeedableRng;
use random_lab_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.
to_lab_string()returns stable crate formatting, not a full CSS serialization engine.