About
Lightness, also known as value or tone, is a property (coordinate) placed on a linear scale where:
- White is the highest possible value (the lightest)
- Black is the lowest value (the darkest)
- Gray is the a medium value. The midpoint between black and white, neither dark nor light.
Some colors are naturally:
- light like yellow (high lightness, high value)
- darker, like violet (low lightness, low value)
and can therefore be projected on the greyscale.
- Lightness is also known, some confused with brightness
- The scale is known as the greyscale
- The opposite of lightness is known as darkness
Name
Various color models have an explicit term for this property.
- The Munsell color model uses the term value
- The HSL color model and Lab color space use the term lightness.
- The HSV model uses the term value a little differently: a color with a low value is nearly black, but one with a high value is the pure, fully saturated color.
Colorspace
Lightness may be used in colorspace as coordinate. Example with HSL.
Operation
Tint (Increase) vs Shade (decrease)
In subtractive color (i.e. paints), lightness value changes can be achieved by adding black or white to the color.
Both processes (tint and shade) affect the saturation but the hue remains unchanged.
Calculation
From Rgb
from a rgb colorspace
$max = max($red, $green, $blue);
$min = min($red, $green, $blue);
$lightness = ($max + $min) / 2;