Garry's Mod Wiki

Revision Difference

COLOR:SetBrightness#563431

<function name="SetBrightness" parent="Color" type="classfunc">⤶ <description>Converts a <page>Color</page> into [HSV color space](https://en.wikipedia.org/wiki/HSL_and_HSV), sets the [brightness also known as "value"](https://en.wikipedia.org/wiki/Brightness) and converts it back into an RGB color.⤶ ⤶ This is useful to quickly change the brightness of the color without changing hue or saturation, allowing for things like easy theming.⤶ </description>⤶ <realm>Shared and Menu</realm>⤶ <added>2025.01.23</added>⤶ <args>⤶ <arg name="saturation" type="number">The new brightness value in range [0, 1]</arg>⤶ </args>⤶ </function>⤶ ⤶