The deflection value of the color C1 to the color C2 is defined as the angle at which the color C1 is deflected in a clockwise direction to the color C2.
The deflection value and the two color C1 are similar to the C2 angle, but not exactly the same. The angle between the two colors is expressed as the angle of the hue value of the two colors, and the value range is the same as the angle between the 0,180],C1 and the C2 and the C2 and the C1. The deflection value specially C1 the angle which is deflected by the clockwise, therefore takes the value range to be [0,360]. The deflection values of C1 to C2 and C2 to C1 are not the same, their and 360.
The H1 is the C1 and the red angle, the H2 is the C2 and the red angle. (Related calculations refer to "Color v--in your computer to quickly calculate the hue value of a color")
As pictured above
If C1 and C2 are on the right:
H=H2-H1; if h<0, then h=360-h
If C1 and C2 are on the left;
H=H1-H2, if h<0, then h=360-h
If C1 on the right, C2 on the left.
H=360-h1-h2
If C1 on the left, C2 on the right.
H=h1+h2
This article is a transitional article to prepare for the calculation of the middle color of the two colors.
Source: http://grenet.cnblogs.com/