Global/ColorToHSL

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Use interval notation)
 
Line 1: Line 1:
 
{{Func
 
{{Func
 
|Description=Converts a {{Struct|Color}} into HSL color space.
 
|Description=Converts a {{Struct|Color}} into HSL color space.
 
{{NextUpdate}}
 
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
Line 13: Line 11:
 
{{Ret
 
{{Ret
 
|type=number
 
|type=number
|desc=The hue in degrees [0, 360).
+
|desc=The hue in degrees [0, 360).
 
}}
 
}}
 
{{Ret
 
{{Ret
 
|type=number
 
|type=number
|desc=The saturation in the range [0, 1].
+
|desc=The saturation in the range [0, 1].
 
}}
 
}}
 
{{Ret
 
{{Ret
 
|type=number
 
|type=number
|desc=The lightness in the range [0, 1].
+
|desc=The lightness in the range [0, 1].
 
}}
 
}}

Latest revision as of 16:58, 12 November 2019

 ColorToHSL( )

Contents

Description

Converts a Color structure into HSL color space.

Arguments

table color

Returns

number

The hue in degrees [0, 360).

Returns

number

The saturation in the range [0, 1].

Returns

number

The lightness in the range [0, 1].
Personal tools
Navigation