Open woom221 opened 1 year ago
H prime when R is maximum looks like
((G - B) / (max - min)) mod 6
however,
if we consider R max and assume B min,
we get
(G - B) / (R - B)
since G <= R, this is definitely less than 6 (less than or equal to 1)
even if we assume G is min,
(G - B) / (R - G)
if we consider B <= R, abs((G-B)/ (R-G)) is still less than or equal to 1.
So what is the point of mod 6 here?
See #35 - the mod 6 allows it to wrap around to be positive again, since we want our hue values to be positive angles.
H prime when R is maximum looks like
((G - B) / (max - min)) mod 6
however,
if we consider R max and assume B min,
we get
(G - B) / (R - B)
since G <= R, this is definitely less than 6 (less than or equal to 1)
even if we assume G is min,
(G - B) / (R - G)
if we consider B <= R, abs((G-B)/ (R-G)) is still less than or equal to 1.
So what is the point of mod 6 here?