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.
Named after the soft leather moccasin shoe: a light peach-tan (#ffe4b5), a little more yellow than peachpuff.
Color codes for Moccasin
| CSS keyword | moccasin |
|---|---|
| HEX | #FFE4B5 |
| RGB | rgb(255, 228, 181) |
| HSL | hsl(38, 100%, 85%) |
| HWB | hwb(38 71% 0%) |
| OKLCH | oklch(93% 0.068 81.4) |
| CMYK (naive, no ICC profile) | cmyk(0%, 11%, 29%, 0%) |
| Decimal | 16,770,229 |
| Hue family | Yellows |
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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on moccasin | 17.01:1 | Pass | Pass | Pass | Pass | 92.0 |
| White text on moccasin | 1.23:1 | Fail | Fail | Fail | Fail | −13.4 |
| Moccasin text on white | 1.23:1 | Fail | Fail | Fail | Fail | 11.6 |
| Moccasin text on black | 17.01:1 | Pass | Pass | Pass | Pass | −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)
- 5%
#ffe5b9 - 15%
#ffe8c0 - 25%
#ffebc8 - 35%
#ffedcf - 45%
#fff0d6 - 55%
#fff3de - 65%
#fff6e5 - 75%
#fff8ed - 85%
#fffbf4 - 95%
#fffefb
Shades (mixed with black)
- 5%
#f2d9ac - 15%
#d9c29a - 25%
#bfab88 - 35%
#a69476 - 45%
#8c7d64 - 55%
#736751 - 65%
#59503f - 75%
#40392d - 85%
#26221b - 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.
| Harmony | Rotation | Color |
|---|---|---|
| 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
| Color | HEX | ΔE OK |
|---|---|---|
| navajowhite | #ffdead | 1.5 |
| bisque | #ffe4c4 | 1.9 |
| wheat | #f5deb3 | 2.2 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| orange-200 | #ffd6a7 | 3.3 |
| amber-100 | #fef3c6 | 3.7 |
| orange-100 | #ffedd4 | 3.9 |
Code snippets
.element {
color: moccasin;
background-color: #ffe4b5;
border-color: rgb(255 228 181);
outline-color: oklch(93% 0.068 81.4);
}<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 */import SwiftUI
extension Color {
static let moccasin = Color(red: 1.000, green: 0.894, blue: 0.710)
}import androidx.compose.ui.graphics.Color
val Moccasin = Color(0xFFFFE4B5)import 'package:flutter/material.dart';
const moccasin = Color(0xFFFFE4B5);<!-- 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.