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