Gets the lightness value of a color.
lightness()
extracts the HSL lightness value from a p5.Color object, an array of color components, or a CSS color string.
By default, lightness()
returns a color's HSL lightness in the range 0 to 100. If the colorMode() is set to HSL, it returns the lightness value in the given range.
Examples
Syntax
lightness(color)
Parameters
color
p5.Color|Number[]|String:
p5.Color object, array of color components, or CSS color string.
Returns
Number: the lightness value.
This page is generated from the comments in src/color/creating_reading.js . Please feel free to edit it and submit a pull request!