CSS named color
Moccasin #FFE4B5
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) | — |
| RGB | rgb(255, 228, 181) |
| RGBA | rgba(255, 228, 181, 1) |
| 8-digit HEX | #FFE4B5FF |
| HSL | hsl(38, 100%, 85%) |
| HSV / HSB | 38°, 29%, 100% |
| CMYK | 0%, 11%, 29%, 0% |
| RGB 0–1 | 1, 0.894, 0.71 |
| Decimal | 16770229 |
| CSS keyword | moccasin |
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
| Text | Background | Ratio | WCAG 2.x |
|---|---|---|---|
| White | Moccasin | 1.23:1 | Fail |
| Black | Moccasin | 17.01:1 | AAA |
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.