pub static lightness: LightnessInternalTypeExpand description
Extracts the HSL lightness value from a color or pixel array.
Examples
noStroke();
colorMode(HSL);
let c = color(156, 100, 50, 1);
fill(c);
rect(15, 20, 35, 60);
let value = lightness(c); // Sets 'value' to 50
fill(value);
rect(50, 20, 35, 60);Parameters
color p5.Color object, color components,
or CSS color