Hue Arc Length
This rule checks that the maximum hue arc length in the image does not exceed a specified value.
Parameter table
param | unit | required | description |
---|---|---|---|
maxHueArcLength | ° | yes | Maximum hue arc length in degrees (maxHueArcLength ). |
Detailed description
The Hue Arc Length rule assesses images to ensure that the hues present do not form a continuous arc exceeding the specified maximum hue arc length. This capability is particularly useful for controlling the presence of various shades of a single color in an image.
Here's an example, where we see a 30° arc around the blue represented by 240° on the hue wheel, the entire wheel has been grayed out except for the hue between 225° and 255°.
The process involves converting RGB values to HSL and extracting unique hues while excluding transparent pixels and colors close to black, white, and gray. By sorting the hues and calculating the maximum difference between adjacent hues, the rule determines the extent of the hue arc. The validation compares this calculated hue arc length with the specified maximum, ensuring adherence to the defined constraints.
How to setup
This rule evaluates whether the image's hues adhere to the specified constraints. Key parameters include:
maxHueArcLength
: Maximum hue arc length in degrees.
The parameter is required, and its value should be a number greater or equal to 1° not exceeding 359°.
Creator tips
- Analyze the color distribution and hue variations in the image.
- Utilize image editing tools to adjust hues and observe their impact.
Examples
value | valid | maxHueArcLength | description |
---|---|---|---|
❌ | 30 | The image should have a maximum hue arc length of 30°. | |
✅ | 30 | The image should have a maximum hue arc length of 60°. |