Home

huecomponent

The hue component is a fundamental part of several perceptual color models, such as HSV (also known as HSB) and HSL. It encodes the type or family of color on a circular color wheel, representing where the color lies between red, yellow, green, cyan, blue, and magenta. Hue is typically expressed as an angle, usually in degrees from 0 to 360, where 0 or 360 corresponds to red, 60 to yellow, 120 to green, 180 to cyan, 240 to blue, and 300 to magenta. Some implementations use a normalized range from 0 to 1.

Hue is not directly observable in the RGB color space; it is derived when converting RGB values

Applications of the hue component include color-based segmentation, tracking, sorting, and manipulation in imaging and graphics.

to
HSV
or
HSL.
The
conversion
considers
the
maximum
and
minimum
of
the
red,
green,
and
blue
components.
If
all
three
components
are
equal,
the
color
is
a
shade
of
gray
and
the
hue
is
undefined.
Otherwise,
the
hue
is
computed
from
which
component
is
the
maximum
and
the
relative
differences
among
the
components,
yielding
an
angle
on
the
color
wheel
that
places
the
color
in
the
appropriate
sector.
Different
variants
of
the
model
define
the
exact
calculation,
but
all
aim
to
map
a
color
to
a
single
angular
hue
value
while
separately
representing
saturation
and
lightness
or
value.
Hue
is
relatively
stable
with
respect
to
changes
in
brightness,
but
it
can
be
affected
by
lighting,
shading,
and
saturation.
In
practice,
hue
is
often
used
in
combination
with
saturation
and
lightness
or
value
to
achieve
robust
color
analysis,
with
awareness
of
potential
ambiguities
when
colors
are
desaturated
or
display
under
varying
illumination.