Garry's Mod Wiki

Color:SetSaturation

  Color:SetSaturation( number saturation )

Description

Converts a Color into HSV color space, sets the saturation and converts it back into an RGB color.

This is useful to quickly change the saturation of the color without changing hue or luminance, allowing for things like easy theming.

Arguments

1 number saturation
The new saturation value in range [0, 1]