Color AdjustHue( float amount )

book_4_sparkGenerated
code_blocksInput

Description

The AdjustHue method allows you to modify the hue of a color by a specified amount. This method is useful for creating color variations by shifting the hue component of the color while keeping the saturation and brightness intact.

Usage

To use the AdjustHue method, call it on an instance of the Color struct, passing a float value as the amount parameter. The amount represents the degree to adjust the hue, where positive values shift the hue clockwise and negative values shift it counterclockwise.

Example

// Example of using AdjustHue method
Color originalColor = new Color(0.5f, 0.4f, 0.3f, 1.0f);
float hueAdjustment = 0.1f; // Adjust hue by 0.1
Color adjustedColor = originalColor.AdjustHue(hueAdjustment);

// The adjustedColor now has its hue shifted by 0.1 from the original color.