These docs are for v1.0. Click to read the latest docs for v1.2.

LIGHTNESS

Gets the lightness channel of the specified color in the HSL colorspace. Returns a decimal number from 0 to 1. For more information about hue, see: https://en.wikipedia.org/wiki/HSL_and_HSV#Lightness

Syntax

=LIGHTNESS(color)

Arguments

ArgumentTypeDescription
colorColorThe color

Examples

=LIGHTNESS("#bf4040")0.5
Gets the lightness for the color represented by the hex color code #bf4040 (dark red)

=LIGHTNESS(RGB(255, 255, 255))1
Gets the lightness for a color having an RGB value of white

=LIGHTNESS(0)#ERROR!
Attempts to get the lightness from an integer, which is invalid because it cannot be converted to a color