The deflection value from color C1 to color C2 is defined as the angle at which color C1 is redirected clockwise to color C2.
The deflection value is similar to the angle between C1 and C2, but not exactly the same. The angle between two colors is the angle between the two colors. The value range is [0,180]. The angle between C1 and C2 is the same as that between C2 and C1. The deflection value is specially set to the angle of C1 deflection along clockwise, so the value range is [0,360 ). The deflection values from C1 to c2 are different from those from C2 to C1. Their sum is 360.
H1 is the angle between C1 and red, while H2 is the angle between C2 and red. (For related calculations, see "color V in the computer -- quick calculation of the color phase value ")
For example
If both c1 and c2 are on the right:
H = H2-H1; If H <0, H = 360-h
If both c1 and c2 are on the left;
H = H1-H2, if H <0, H = 360-h
If C1 is on the right and C2 is on the left
H = 360-h1-h2
If C1 is on the left and C2 is on the right
H = H1 + h2
This article is a transitionalArticleTo calculate the median of the two colors.