CSS color names · Yellows

Moccasin color: hex #ffe4b5, RGB and HSL

Moccasin is the CSS keyword moccasin, hex #ffe4b5, rgb(255, 228, 181), hsl(38, 100%, 85%). It is a light, fully saturated orange in the yellows family. Below: the colors that go with it, its tints and shades, how it reads as text, and a complete interface palette built from it.

CSS name
moccasin
Hex
#ffe4b5
RGB
rgb(255, 228, 181)
HSL
hsl(38, 100%, 85%)
On white
1.23:1 — fails AA; use as a fill, not text
On black
17.02:1 — passes AA for body text
.example {
  color: moccasin;          /* keyword */
  color: #ffe4b5;          /* hex */
  color: rgb(255, 228, 181); /* rgb */
  color: hsl(38, 100%, 85%); /* hsl */
}

What colors go with moccasin

Each match keeps moccasin's saturation and lightness and rotates only the hue, so the relationship is the wheel's and nothing else. Any of these can be an accent beside moccasin as the primary; the harmony guides explain which rule suits which interface.

Complementary

The opposite hue, 180° away — the strongest contrast, best kept to one accent per screen.

#b5d0ff

Split-complementary

The two neighbors of the complement, at 150° and 210° — most of the contrast with less tension, and two accents instead of one.

#b5f5ff
#bfb5ff

Triadic

Two hues at 120° and 240° — three evenly spaced signals, the scheme charts and category colors want.

#b5ffe4
#e4b5ff

Analogous

The neighbors at −30° and +30° — calm and cohesive, with emphasis coming from weight and size rather than hue.

#ffbfb5
#f5ffb5

Tints and shades of moccasin

Tints add lightness toward white; shades remove it toward black. The hue and saturation stay fixed, so every step still reads as moccasin — these are the hover, pressed, disabled and surface variants a single brand color needs.

Tints (lighter)

#ffe9c1
#ffedce
#fff2da
#fff6e6
#fffbf3

Shades (darker)

#ffc96c
#ffaf24
#da8a00
#915c00
#492e00

A UI color palette built from moccasin

The eight semantic roles an interface actually uses, derived from moccasin as the primary with the split-complementary rule: secondary and accent rotate around the wheel, and the five neutrals take the hue at lightness steps tuned for light and dark mode. This is the same derivation the palette generator runs — open it there to change the rule, drag the anchors, or export the set as CSS variables.

Light mode
primary
#ffe4b5
secondary
#b5f5ff
accent
#bfb5ff
background
#fdfdfc
surface
#f7f5f3
text
#221c11
muted
#8f7b56
border
#ece7df
Dark mode
primary
#ffe4b5
secondary
#b5f5ff
accent
#bfb5ff
background
#1b160e
surface
#282115
text
#f6f5f3
muted
#b8ab94
border
#493d27

Using moccasin in an interface

Pure yellow fails contrast against white for text at every size, so it belongs on dark surfaces or as a fill with dark text. The creams are excellent warm page backgrounds; the khakis are muted enough for borders and tags. Whichever role moccasin takes, define it once as a token rather than repeating the keyword: the semantic palette guide covers the eight roles, and the guides to complementary, triadic and the other color schemes explain how to weight the matches above.

What is the hex code for Moccasin?
Moccasin is #ffe4b5. In CSS the keyword moccasin, the hex #ffe4b5, rgb(255, 228, 181) and hsl(38, 100%, 85%) all paint the same color.
What colors go with Moccasin?
Its complement is #b5d0ff, the split-complementary pair is #b5f5ff and #bfb5ff, the triadic partners are #b5ffe4 and #e4b5ff, and the analogous neighbors are #ffbfb5 and #f5ffb5. In an interface, use Moccasin for most colored elements and one of these for a single accent, at roughly an 80/20 split.
What is the opposite of Moccasin on the color wheel?
The opposite (complementary) color is #b5d0ff, the same saturation and lightness rotated 180° around the HSL wheel. Complementary pairs give the strongest contrast, which is why the complement should be used sparingly rather than at equal weight.
Can I use Moccasin for text?
Moccasin as text on white has a contrast ratio of 1.23:1, which fails WCAG AA for body text (4.5:1) and for large text (3:1). On black it is 17.02:1, which passes for body text. Use it as text on dark surfaces, or as a fill with dark text on top.

Similar named colors

More yellows

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.