Given the intensities of the three primaries RGB 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 3D point
. We also 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.
One of the definitions of intensity is
First find the intersection of the color vector with the
RGB 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