embcol.random.OklchGenerator.random¶
- OklchGenerator.random(n=None, min_lightness=0.0, max_lightness=1.0, min_hue=-3.141592653589793, max_hue=3.141592653589793)[source]¶
Generate Oklch colors randomly.
- Parameters:
n (
int, optional) – Number of generated colors. If nothing is given, one color is generated.min_lightness (
float, optional) – Lower bound of the lightness component.max_lightness (
float, optional) – Upper bound of the lightness component.min_hue (
float, optional) – Lower bound of the hue component.max_hue (
float, optional) – Upper bound of the hue component.
- Returns:
numpy.ndarrayoffloat– Oklch colors. All colors are within the gamut of the sRGB color space. If n is given, the shape is(n, 3). Otherwise, the shape is(3,).