Garry's Mod Wiki

Color:AddHue

  Color:AddHue( number hue )

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 HSV color space, adds given value to the hue and converts it back into an RGB color.

A slightly more efficient combination of COLOR:GetHue & COLOR:SetHue

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

Arguments

1 number hue
The hue value to add in degrees [0, 360).