Garry's Mod Wiki

ColorToHSV

Description

Converts a Color into HSV color space.

Arguments

1 table color
The Color.

Returns

1 number
The hue in degrees [0, 360).
2 number
The saturation in the range [0, 1].
3 number
The value in the range [0, 1].

Example

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

print(ColorToHSV(Color(255, 255, 0)))
Output:
60 1 1

Page Links


Special Pages


Wikis

?

Render Time: 33ms

DB GetPage 3
Generate Html 6
SaveChanges (1) 9
Render Body 0
Render Sidebar 6