Garry's Mod Wiki

Color:GetBlackness

  number Color:GetBlackness()

Recently Added

This was recently added in version (2025.01.23). It might only be available on the Dev Branch right now.

Description

Converts a Color into HWB color space and returns the "blackness" of the color.

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

Returns

1 number blackness
Blackness of the color in range [0, 1]