float Hue { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Hue property represents the hue component of a color in the HSV (Hue, Saturation, Value) color model. The hue is expressed as a floating-point value ranging from 0 to 360 degrees, where each degree corresponds to a specific color on the color wheel. This property is part of the ColorHsv struct, which encapsulates a color in the HSV format.

Usage

To access or modify the hue of a ColorHsv instance, use the Hue property. This property can be both read and set, allowing you to retrieve the current hue value or assign a new one within the valid range of 0 to 360.

Example

// Create a ColorHsv instance with a specific hue
ColorHsv color = new ColorHsv();
color.Hue = 120.0f; // Set hue to 120 degrees (green)

// Retrieve the hue value
float currentHue = color.Hue;

// Modify the hue
color.Hue = 240.0f; // Change hue to 240 degrees (blue)