CSS named color

Moccasin #FFE4B5

moccasin rgb(255, 228, 181)

Moccasin is a light orange with the hex code #FFE4B5, which converts to rgb(255, 228, 181). Open #FFE4B5 in the converter to tweak it.

Moccasin color values

HEX#FFE4B5
HEX (shorthand)—
RGBrgb(255, 228, 181)
RGBArgba(255, 228, 181, 1)
8-digit HEX#FFE4B5FF
HSLhsl(38, 100%, 85%)
HSV / HSB38°, 29%, 100%
CMYK0%, 11%, 29%, 0%
RGB 0–11, 0.894, 0.71
Decimal16770229
CSS keywordmoccasin

How #FFE4B5 converts to RGB

Split the hex code into three pairs and read each pair as a base-16 number: FF → 255, E4 → 228, B5 → 181. That gives rgb(255, 228, 181). The step-by-step guide explains the math.

Shades of Moccasin

Mixed toward black in 10% steps. Click a swatch to copy its hex.

Tints of Moccasin

Mixed toward white in 10% steps.

Color harmonies

Hue rotations of Moccasin on the HSL color wheel, keeping saturation and lightness fixed. The color harmony guide explains when each scheme works.

Complementary

Analogous

Split-complementary

Triadic

Tetradic (square)

Contrast and accessibility

TextBackgroundRatioWCAG 2.x
White Moccasin 1.23:1Fail
Black Moccasin 17.01:1AAA

Use black text on a moccasin background. Test any other pair in the contrast checker; thresholds are explained in the WCAG contrast guide.

Use Moccasin in CSS

.element {
  color: moccasin;                         /* keyword */
  background-color: #FFE4B5;            /* hex */
  border-color: rgb(255 228 181 / 50%);    /* 50% transparent */
}

Need it semi-transparent? Append an alpha byte: #FFE4B580 is Moccasin at 50% opacity. See RGBA & transparency.

Similar named colors

FAQ

What is the HEX code for Moccasin?

The CSS named color moccasin is #FFE4B5 in hexadecimal. In CSS you can write color: moccasin; or color: #FFE4B5; — both produce the same pixel.

What is Moccasin in RGB?

Moccasin is rgb(255, 228, 181): red 255, green 228, blue 181 on the 0–255 scale. As normalized 0–1 floats that is (1, 0.894, 0.71).

Is white or black text more readable on Moccasin?

Black text is more readable. White on #FFE4B5 has a contrast ratio of 1.23:1 (Fail), black on #FFE4B5 has 17.01:1 (AAA). WCAG AA needs 4.5:1 for normal text.

Copied!