Garry's Mod Wiki

Color:GetLightness

  number Color:GetLightness()

Description

Converts a Color into HSL color space and returns the "lightness" of the color.

See COLOR:ToHSL if you want to get all 3 components.

Returns

1 number lightness
Lightness in range [0, 1]