Home

hexcolor

Hex color refers to a color value expressed in hexadecimal notation, commonly used in web development. The standard form is #RRGGBB, where RR, GG, and BB are two-digit hexadecimal numbers representing the red, green, and blue components of a color in the sRGB color space. Each component ranges from 00 to FF (0 to 255), and the combination defines a specific color.

A three-digit shorthand is also supported in many contexts: #RGB expands to #RRGGBB by duplicating each digit

Examples: #ff0000 is red, #00ff00 is green, #0000ff is blue, #ffffff is white, and #000000 is black.

Usage and compatibility: Hex colors are used in HTML style attributes and in CSS stylesheets, as well

(for
example,
#0F8
expands
to
#00FF88).
In
modern
CSS,
an
eight-digit
form
is
defined
as
#RRGGBBAA,
where
the
last
two
digits
AA
encode
the
alpha
transparency.
A
four-digit
shorthand
#RGBA
is
also
recognized,
expanding
to
#RRGGBBAA.
The
eight-digit
form
#11223344
encodes
red=0x11,
green=0x22,
blue=0x33,
alpha=0x44.
Some
tools
display
hex
colors
with
uppercase
or
lowercase
hex
digits
interchangeably.
as
in
many
programming
frameworks
that
manipulate
color.
They
are
generally
interpreted
as
sRGB
values.
For
accessibility,
authors
should
ensure
sufficient
contrast
between
foreground
and
background
colors,
as
hex
alone
does
not
guarantee
readability.
Hex
colors
remain
a
standard
representation
in
digital
design
and
web
development.