Skip to content

CSS named color

Moccasin #FFE4B5

Moccasin (CSS keyword moccasin) has the hex code #FFE4B5 and the RGB value rgb(255, 228, 181): a pale, muted beige.

Moccasin#FFE4B5

Named after the soft leather moccasin shoe: a light peach-tan (#ffe4b5), a little more yellow than peachpuff.

Color codes for Moccasin

Color codes for Moccasin
CSS keywordmoccasin
HEX#FFE4B5
RGBrgb(255, 228, 181)
HSLhsl(38, 100%, 85%)
HWBhwb(38 71% 0%)
OKLCHoklch(93% 0.068 81.4)
CMYK (naive, no ICC profile)cmyk(0%, 11%, 29%, 0%)
Decimal16,770,229
Hue familyYellows

Contrast and accessibility

On moccasin, black text has a contrast ratio of 17.01:1 and passes AAA at any text size; white text reaches 1.23:1.

WCAG 2.2 contrast ratios (success criteria 1.4.3 and 1.4.6: AA needs 4.5:1 for normal text and 3:1 for large text, AAA needs 7:1 and 4.5:1). APCA Lc is the lightness contrast from the APCA-W3 0.0.98G model proposed for WCAG 3; a higher absolute value is more readable, and Lc 75 is its suggested minimum for body text.

Contrast and accessibility
PairRatioAAAA largeAAAAAA largeAPCA Lc
Black text on moccasin17.01:1PassPassPassPass92.0
White text on moccasin1.23:1FailFailFailFail−13.4
Moccasin text on white1.23:1FailFailFailFail11.6
Moccasin text on black17.01:1PassPassPassPass−92.5

Tints and shades

Each step mixes moccasin with white (tints) or black (shades) in gamma-encoded sRGB, the same result as color-mix(in srgb, moccasin, white 25%) in CSS.

Tints (mixed with white)

  1. 5%
    #ffe5b9
  2. 15%
    #ffe8c0
  3. 25%
    #ffebc8
  4. 35%
    #ffedcf
  5. 45%
    #fff0d6
  6. 55%
    #fff3de
  7. 65%
    #fff6e5
  8. 75%
    #fff8ed
  9. 85%
    #fffbf4
  10. 95%
    #fffefb

Shades (mixed with black)

  1. 5%
    #f2d9ac
  2. 15%
    #d9c29a
  3. 25%
    #bfab88
  4. 35%
    #a69476
  5. 45%
    #8c7d64
  6. 55%
    #736751
  7. 65%
    #59503f
  8. 75%
    #40392d
  9. 85%
    #26221b
  10. 95%
    #0d0b09

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, moccasin's complementary color is #D4E9FF (close to lavender), its analogous colors are #FFDCC0 and #E9EDB9, and its triadic partners are #B2F6FB and #FDDAFF. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#d4e9ff
Analogous−30°, +30°#ffdcc0#e9edb9
Triadic+120°, +240°#b2f6fb#fddaff
Split-complementary+150°, +210°#bbf1ff#e7e1ff

Computed in OKLCH: the hue is rotated by 180° (complementary), ±30° (analogous), ±120° (triadic) and 180° ±30° (split-complementary) while lightness and chroma stay fixed. Results that fall outside sRGB are brought back with the CSS Color 4 gamut mapping algorithm. Because this uses OKLCH, the values differ from tools that rotate hue in HSL, but every color keeps the same perceived lightness.

Warm or cool?

Moccasin is a warm color: its hue is 38° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.

Nearest named and Tailwind colors

Distance is ΔE OK, the Euclidean distance in OKLab multiplied by 100. Values under about 2 are hard to tell apart side by side.

Nearest CSS named colors

Nearest CSS named colors
ColorHEXΔE OK
navajowhite#ffdead1.5
bisque#ffe4c41.9
wheat#f5deb32.2

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
orange-200#ffd6a73.3
amber-100#fef3c63.7
orange-100#ffedd43.9

Code snippets

CSS
.element {
  color: moccasin;
  background-color: #ffe4b5;
  border-color: rgb(255 228 181);
  outline-color: oklch(93% 0.068 81.4);
}
Tailwind CSS
<div class="bg-[#ffe4b5] text-black">...</div>

/* or register it once in your CSS (Tailwind v4) */
@theme {
  --color-moccasin: #ffe4b5;
}
/* then use bg-moccasin, text-moccasin, border-moccasin */
SwiftUI
import SwiftUI

extension Color {
  static let moccasin = Color(red: 1.000, green: 0.894, blue: 0.710)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

val Moccasin = Color(0xFFFFE4B5)
Flutter
import 'package:flutter/material.dart';

const moccasin = Color(0xFFFFE4B5);
Android XML
<!-- res/values/colors.xml -->
<color name="moccasin">#FFE4B5</color>

Frequently asked questions

What is the hex code for moccasin?
The hex code for moccasin is #FFE4B5. The same color is rgb(255, 228, 181), hsl(38, 100%, 85%) and oklch(93% 0.068 81.4), and in CSS you can also write the keyword moccasin directly.
Is moccasin a warm or cool color?
Moccasin is a warm color: its hue is 38° on the HSL wheel, in the red, orange and yellow range (0° to about 70°, plus reds above 330°) that is conventionally called warm.
What colors go with moccasin?
Rotating the hue in OKLCH while keeping lightness and chroma, moccasin's complementary color is #D4E9FF (close to lavender), its analogous colors are #FFDCC0 and #E9EDB9, and its triadic partners are #B2F6FB and #FDDAFF. For text on top, black gives the higher contrast.
Can you use white text on moccasin?
White text on moccasin has a contrast ratio of 1.23:1, which fails AA even for large text under WCAG 2.2. Black text reaches 17.01:1 and passes both AA and AAA. In APCA terms that is Lc −13.4 for white and Lc 92.0 for black.
What is the RGB value of moccasin?
Moccasin is rgb(255, 228, 181): red 255, green 228 and blue 181 on the 0 to 255 scale, or 100.0%, 89.4% and 71.0%. As a decimal integer it is 16770229.

Last reviewed by Arielton Oberek.