Garry's Mod Wiki

Color:GetBrightness

  number Color:GetBrightness()

Description

Converts a Color into HSV color space and returns the brightness also known as "value".

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

Returns

1 number brightness
Brightness in range [0, 1]