![]() |
Returns the relative luminance according to W3C specification.
cirq.vis.heatmap.relative_luminance(
color: np.ndarray
) -> float
Spec: https://www.w3.org/TR/WCAG21/#dfn-relative-luminance
Args | |
---|---|
color
|
a numpy array with the first 3 elements red, green, and blue with values in [0, 1]. |
Returns | |
---|---|
relative luminance of color in [0, 1]. |