from colorspace import max_chroma
# Max Chroma for Hue = 0 (red) with Luminance = 50
0, 50) max_chroma(
array([137.96])
Documentation built with Python 3.11.10
, pyp2qmd 0.1.1
and quarto 1.5.57
on GitHub.
Compute approximately the maximum chroma possible for a given hue and luminance combination in the HCL color space.
H
and L
can be single values or multiple values. If both have length > 1
, the length must match. If one is of length 1
it will be recycled to match the length of the other argument. In case the function is not able to create two arrays of the same length an error will be thrown.
max_chroma(H, L, floor=False)
H
int, float, list, numpy.ndarray
L
int, float, list, numpy.ndarray
floor
bool
False
.
numpy.ndarray
: Array of the same length as max(len(H), len(L))
with maximum possible chroma for these hue-luminance combinations.
from colorspace import max_chroma
# Max Chroma for Hue = 0 (red) with Luminance = 50
max_chroma(0, 50)
array([137.96])
array([ 69.51, 137.96, 64.37])
TypeError
: If unexpected input on H
or L
.
TypeError
: If length of H
and L
do not match (see description).
TypeError
: If input floor
is not bool.