Inspect Moccasin (#FFE4B5) in HEX, RGB, HSL, LCH and OKLCH, check its contrast, and copy the value you need.
Moccasin
#FFE4B5
Black text reads best on this background, at 17.02:1.
Moccasin is one of the 148 CSS named colors, and resolves to #FFE4B5 in every browser. In numbers that is rgb(255, 228, 181) and hsl(38, 100%, 85%). Perceptually it is a very light, muted color: OKLCH puts its lightness at 93% and its chroma at 0.068. It sits in the yellows at 81 degrees of OKLCH hue, and reads as a warm color.
White text only reaches 1.23:1 here, so black text is the safer pairing at 17.02:1. Because it is this light, Moccasin works best as a page or card background with dark text over it.
The closest CSS named colors to Moccasin, measured with CIEDE2000, are Wheat (#F5DEB3), NavajoWhite (#FFDEAD), Bisque (#FFE4C4). If Moccasin is not quite right, those are the nearest keywords to try before reaching for a custom value.
HEX
#FFE4B5
RGB
rgb(255, 228, 181)
HSL
hsl(38, 100%, 85%)
HWB
hwb(38 71% 0%)
CMYK
cmyk(0%, 11%, 29%, 0%)
LAB
lab(91.98 4.56 26.59)
LCH
lch(91.98 26.98 80.26)
OKLCH
oklch(92.96% 0.0675 81.38)
WCAG asks for 4.5:1 between body text and its background. On #FFE4B5 white text measures 1.23:1 and black text 17.02:1, so black clears it and white does not.
White text on Moccasin
WCAG 2.2
1.23:1
APCA
Lc 13
Fails AA body text
Fails AAA body text
Fails AA large text
Black text on Moccasin
WCAG 2.2
17.02:1
APCA
Lc 92
Passes AA body text
Passes AAA body text
Passes AA large text
Check Moccasin against any other color in the contrast checker.
Moccasin sits at 93% OKLCH lightness. Holding its hue and chroma and moving only that value carries it up to #FFF8EB and down to #0A0500, which keeps the family recognizable instead of letting it drift toward gray the way a plain HSL ramp does.
#FFE8C0
20% lighter
#FFECCB
40% lighter
#FFF0D6
60% lighter
#FFF4E0
80% lighter
#FFF8EB
100% lighter
#CAB082
20% darker
#977E52
40% darker
#675024
60% darker
#382600
80% darker
#0A0500
100% darker
Build a full accessible scale from #FFE4B5 in the shade generator.
Hues rotated around #FFE4B5 in OKLCH, then pulled back into the sRGB gamut. Each swatch is labelled with the nearest CSS named color so you have a keyword to start from.
Moccasin sits at 81 degrees. Rotating it a half turn lands on 261 degrees, the hue directly opposite. It is the strongest pairing you can make without changing lightness, and the one most likely to vibrate if you use both at full chroma.
The neighbors of Moccasin at 51 and 111 degrees. They stay close enough to read as the same family, which is what you want for hover states, secondary surfaces and gradients.
81, 201 and 321 degrees divide the wheel into thirds. Balanced enough to carry a whole palette without one color dominating the other two.
Instead of the complement at 261 degrees, this pair flanks it at 231 and 291. You keep most of the contrast of a complementary pairing while losing the harshness.
Explore more combinations around Moccasin on the color wheel.
The biggest shift is under tritanopia, where #FFE4B5 reads as #FFDBD6, 17.7 CIEDE2000 units away. If Moccasin is the only thing marking a state or a series, roughly one viewer in twelve will miss it.
Protanopia
#F2E2B2
Deuteranopia
#F9E9B6
Tritanopia
#FFDBD6
Achromatopsia
#E6E6E6
The nearest CSS keywords to #FFE4B5, ranked by perceptual distance rather than by how close their hex digits happen to look.