Moccasin Hex Code #FFE4B5
Moccasin is a very light, moderate yellow with the hex code #FFE4B5. In RGB it is 255, 228, 181, and in HSL it is 38°, 100%, 85%. It is one of the 148 named colors in CSS, so you can write “moccasin” instead of the hex code.
- HEX
- #FFE4B5
- RGB
- rgb(255, 228, 181)
- HSL
- hsl(38, 100%, 85%)
- HSV
- hsv(38°, 29%, 100%)
- CMYK
- cmyk(0%, 11%, 29%, 0%)
- CSS name
- moccasin
CMYK is a simple screen-to-print estimate. Real print results depend on the printer and paper.
About Moccasin
On a white background Moccasin has a contrast ratio of 1.23:1 (Fail), and on black 17.02:1 (AAA). Black text is the better choice on top of it.
It sits on the warm side of the color wheel, a range that tends to feel energetic and appears to advance toward the viewer.
Yellow is the brightest hue, so it is excellent for highlights but difficult to read as text on a white background. Pair it with dark text rather than white.
Shades and tints of Moccasin
Tints mix Moccasin with white and shades mix it with black, in steps of 20%. Select a swatch to copy its hex code.
Color harmonies for Moccasin
These schemes are calculated from Moccasin on the RGB (screen) color wheel. Select a swatch to copy it, or open any scheme in the color wheel to adjust it.
On the artist’s RYB wheel, the complement of Moccasin is #B5B7FF, close to the named color Cornflower Blue.
Moccasin contrast and accessibility
WCAG asks for a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (AA), and 7:1 and 4.5:1 for AAA. This is how Moccasin scores against white and black.
| Against | Ratio | AA normal | AA large | AAA normal | AAA large |
|---|---|---|---|---|---|
| White (#ffffff) | 1.23:1 | ✕ Fail | ✕ Fail | ✕ Fail | ✕ Fail |
| Black (#000000) | 17.02:1 | ✓ Pass | ✓ Pass | ✓ Pass | ✓ Pass |
Moccasin and color blindness
These are approximate previews of how Moccasin can look with the main types of color vision deficiency.
Moccasin looks almost the same.
Moccasin looks almost the same.
Moccasin changes noticeably.
Moccasin changes noticeably.
Gradients with Moccasin
Three ready-made starting points. Copy the CSS, or open one in the generator to edit the stops and check contrast.
Moccasin to a lighter tint
background: linear-gradient(135deg, #ffe4b5 0%, #fff4e1 100%); Moccasin to its analogous neighbour
background: linear-gradient(135deg, #ffe4b5 0%, #f5ffb5 100%); Moccasin to its complement
background: linear-gradient(135deg, #ffe4b5 0%, #b5d0ff 100%); Colors similar to Moccasin
How each close match differs from Moccasin.
- Navajo White #FFDEAD Very close in lightness, saturation and hue.
- Wheat #F5DEB3 Very close in lightness, saturation and hue.
- Bisque #FFE4C4 Very close in lightness, saturation and hue.
- Peach Puff #FFDAB9 Very close in lightness, saturation and hue.
- Blanched Almond #FFEBCD More muted.
- Lemon Chiffon #FFFACD Slightly lighter, more muted, leans more yellow.
Use Moccasin in code
.element {
color: #ffe4b5;
background-color: #ffe4b5;
border-color: moccasin; /* moccasin is a valid CSS color name */
} :root {
--color-moccasin: #ffe4b5;
} <!-- Tailwind arbitrary values -->
<div class="bg-[#ffe4b5] text-[#ffe4b5] border-[#ffe4b5]"></div>
/* Tailwind v4 theme color */
@theme {
--color-moccasin: #ffe4b5;
} Moccasin questions
What is the hex code for Moccasin?
The hex code for Moccasin is #FFE4B5. In RGB that is rgb(255, 228, 181), and in HSL it is hsl(38, 100%, 85%).
What is the complementary color of Moccasin?
On the RGB (screen) color wheel, the complement of Moccasin is #B5D0FF, which is close to Light Steel Blue. On the artist’s RYB wheel it is #B5B7FF, close to Cornflower Blue.
Should I use white or black text on Moccasin?
Black text. It has a contrast ratio of 17.02:1 against Moccasin, which is WCAG AAA. The other option scores 1.23:1.
Is Moccasin accessible as a text color on white?
No. Moccasin on white scores 1.23:1, which is below the WCAG minimum of 3:1 even for large text.
What are darker and lighter shades of Moccasin?
Mixing Moccasin with black gives #CCB691, #99896D, #665B48, #332E24 (20% to 80% black). Mixing it with white gives #FFE9C4, #FFEFD3, #FFF4E1, #FFFAF0 (20% to 80% white).