OklabColor.random constructor
OklabColor.random({})
Generates an OklabColor at random.
minLightness
and maxLightness
constrain the generated
lightness value.
minA
and maxA
constrain the generated a value.
minB
and maxB
constrain the generated b value.
All min and max values must be min <= max && max >= min
, must
be in the range of >= 0.0 && <= 1.0
, and must not be null
.
Implementation
factory OklabColor.random({
double minLightness = 0.0,
double maxLightness = 1.0,
double minA = 0.0,
double maxA = 1.0,
double minB = 0.0,
double maxB = 1.0,
int? seed,
}) {
return cm.OklabColor.random(
minLightness: minLightness,
maxLightness: maxLightness,
minA: minA,
maxA: maxA,
minB: minB,
maxB: maxB,
seed: seed,
).cast();
}