Open pshaughn opened 1 year ago
This seems to be a rotation of an sRGB cube about an axis, where the axis is the achromatic corner diagonal from black to white.
https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle
This is of course bogus as calculations are done on gamma-encoded, not linear-light, values. But the math was constrained by compatibility with long-established industry practice, and would not be seen as a good solution today.
https://drafts.fxtf.org/filter-effects/#funcdef-filter-hue-rotate says just "Applies a hue rotation on the input image", which I think most first-time readers would generally expect to be a rotation in something like RGB or HSV or HSL space. The matrix is specified in https://drafts.fxtf.org/filter-effects/#ref-for-attr-valuedef-type-huerotate without any explanation of how the coeffecients were decided. This seems to be a rotation in YIQ colorspace or something similar, and the spec could be more explicit about that.