Instant properties: hue

The instant property hue corresponds to the hue component of a color operand expressed in the HSL (Hue, Saturation, Luminance) color model.

Declaration

int32 color.hue

Discussion

The read access to this property returns the hue component of a color operand. The write access modifies the hue component of a color operand. The modification automatically updates the red, green and blue components according to the HSL color model while preserving the saturation, luminance and alpha values. The hue property is expressed as an angle in range 0 .. 360 degrees, where 0° represents red, 120° represents green, 240° represents blue, and values in between represent intermediate hues on the color wheel. For example:

var color c = #FF0000FF; // Read the hue value var int32 result = c.hue; // result = 0 (red) // Modify the hue value c.hue = 120; // c = #00FF00FF (green, same saturation and luminance)

Usage in Inspector

When working with Inspector you can easily access, evaluate and modify the hue component. For this purpose select in Inspector the desired color property or attribute and click on the small triangle on its left side to expand and display the subordinated components: