Global/ColorToHSV

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Also menu state)
m (remove Name and Parent)
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=ColorToHSV
 
|Parent=Global
 
 
|Description=Converts a {{Struct|Color}} into HSV color space.
 
|Description=Converts a {{Struct|Color}} into HSV color space.
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu

Revision as of 08:58, 5 October 2016

 ColorToHSV( )

Contents

Description

Converts a Color structure into HSV color space.

Arguments

table color

Returns

number

The hue in degrees.

Returns

number

The saturation in the range 0-1.

Returns

number

The value in the range 0-1.

Examples

Example

Creates a color and prints the HSV values to the console.

print(ColorToHSV(Color(255, 255, 0)))

Output:

60 1 1
Personal tools
Navigation