ColorToHSV

From Garry's Mod
Jump to: navigation, search
 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