Skip to content

[css-color-4] Incorrect description on preprocessing hue angles for interpolation #8838

Description

@yarusome

The Hue Interpolation section says:

Both angles and their difference need to be constrained to [0, 360] prior to interpolation. To do this, the minimum number of turns that fit in the lesser angle is added or subtracted from both angles, bringing the lesser angle into the range [0,360); and if the difference between them is greater than 360° then the minimum number of turns to bring the difference into the range [0,360] is further subtracted from the greater angle.

However, the angle pair 1, θ2) = (40deg, 400deg) passes the preprocessing steps without being modified, leaving with θ2 > 360deg.

Based on the four algorithms described in this section, it seems that only the lesser of the two angles needs to be in [0deg, 360deg) (and the difference be in [0deg, 360deg]). However, this implies that the greater angle can be outside [0deg, 360deg], which contradicts Section 4.3:

This number is normalized to the range [0,360].

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions