Phaser API Documentation

<static> HSVToRGB(h, s, v, [out])


Converts a HSV (hue, saturation and value) color set to RGB.

Conversion formula from

Assumes HSV values are contained in the set [0, 1].


name type arguments description
h number

The hue, in the range 0 - 1. This is the base color.

s number

The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.

v number

The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.

out Phaser.Display.Color | Phaser.Types.Display.ColorObject <optional>

A Color object to store the results in. If not given a new ColorObject will be created.


An object with the red, green and blue values set in the r, g and b properties.

Since: 3.0.0