ColorToHSV

From Garry's Mod
Revision as of 15:16, 7 October 2019 by Code gs (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 ColorToHSV( )

Contents

Description

Converts a Color structure into HSV 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 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