Given the intensities of the three primaries
,
, and
of a color,
we can find its HSV representation using different models. Here we use the
RGB plane of the cube to find the corresponding HSV. The three vertices are
represented by
,
and
, and the three
components of the given color is represented by a point
in the
RGB 3-D space. As we assume the intensities are normalized so that the
,
and
values are between 0 and 1, so that point
is inside or on
the surface of the color cube.
The intensity
can be defined as:
First find the intersection of the color vector
with the
RGB plane (triangle)
:
![]() |
|||
![]() |
![]() |
|||
![]() |
The saturation of the colors on any of the three edges of the RGB triangle
is defined as 1 (100% saturated), and the saturation of
is zero. Denote as
the intersection of the extension of line
with the edge. If the normalized color is
,
,
and if
,
. The saturation of any color point
between
and
is defined as