Given
,
and
, we can first find
,
, and
on the RGB
triangle, and the find
,
, and
. Consider three possible cases
in terms of the hue angle
:
From
, solving for
we get
To find
, consider the triangle
:
Here vector
is the projection of vector
onto the line
,
and all points
,
, and
are on the RGB
triangle. Now consider the following steps:
In summary, given the H, S, and I values, we can obtain the R, G, and B
components by
Note that after the HSI to RGB conversion, we need to convert the
R, G, and B values from the range of
back to the three
components for a pixel in a color image in the range of
.