Home

HexCodes

Hex codes, short for hexadecimal color codes, are a common way to specify colors in computing and digital media. They encode red, green, and blue components of a color in base-16 notation, typically as a six-digit string preceded by a hash sign, for example #RRGGBB. Each pair of hex digits ranges from 00 to FF, corresponding to intensity values from 0 to 255.

The standard form uses six digits. A three-digit shorthand is also supported in many contexts, where #RGB

Some environments support alpha transparency via extended hex forms such as #RRGGBBAA (or the shorthand #RGBA

Common usage includes color specification in web design (CSS), graphics software, and design tokens. Examples: color:

Notes: hex codes are portable across platforms but should be used with accessibility in mind, ensuring sufficient

expands
to
#RRGGBB
by
duplicating
each
digit
(e.g.,
#3A5
becomes
#33AA55).
Hex
digits
are
case-insensitive,
so
#FFAA00
and
#ffaa00
are
equivalent.
in
some
implementations),
where
AA
encodes
opacity.
In
CSS,
the
rgba()
function
is
an
alternative
for
specifying
transparency
and
is
widely
supported;
modern
browsers
also
support
the
8-digit
hex
form.
#4A90E2;
background-color:
#123456.
Hex
codes
map
to
the
sRGB
color
space
and
are
typically
used
with
other
color
formats
and
color
management
workflows.
contrast.
They
are
compatible
with
most
color
pickers
and
design
tools,
making
them
a
staple
in
digital
color
work.