Skip to content

CSS named color

LightYellow #FFFFE0

LightYellow (CSS keyword lightyellow) has the hex code #FFFFE0 and the RGB value rgb(255, 255, 224): an off-white with a yellow tint.

LightYellow#FFFFE0

A near-white with a yellow tint (#ffffe0). It is the classic sticky-note and highlight background color.

Color codes for LightYellow

Color codes for LightYellow
CSS keywordlightyellow
HEX#FFFFE0
RGBrgb(255, 255, 224)
HSLhsl(60, 100%, 94%)
HWBhwb(60 88% 0%)
OKLCHoklch(99.2% 0.04 107.1)
CMYK (naive, no ICC profile)cmyk(0%, 0%, 12%, 0%)
Decimal16,777,184
Hue familyYellows

Contrast and accessibility

On lightyellow, black text has a contrast ratio of 20.63:1 and passes AAA at any text size; white text reaches 1.01: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 lightyellow20.63:1PassPassPassPass104.8
White text on lightyellow1.01:1FailFailFailFail0.0
Lightyellow text on white1.01:1FailFailFailFail0.0
Lightyellow text on black20.63:1PassPassPassPass−106.5

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #ffffe2
  2. 15%
    #ffffe5
  3. 25%
    #ffffe8
  4. 35%
    #ffffeb
  5. 45%
    #ffffee
  6. 55%
    #fffff1
  7. 65%
    #fffff4
  8. 75%
    #fffff7
  9. 85%
    #fffffa
  10. 95%
    #fffffd

Shades (mixed with black)

  1. 5%
    #f2f2d5
  2. 15%
    #d9d9be
  3. 25%
    #bfbfa8
  4. 35%
    #a6a692
  5. 45%
    #8c8c7b
  6. 55%
    #737365
  7. 65%
    #59594e
  8. 75%
    #404038
  9. 85%
    #262622
  10. 95%
    #0d0d0b

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, lightyellow's complementary color is #FBFAFF (close to ghostwhite), its analogous colors are #FFFADF and #F0FFE9, and its triadic partners are #E6FFFF and #FFF5FF. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#fbfaff
Analogous−30°, +30°#fffadf#f0ffe9
Triadic+120°, +240°#e6ffff#fff5ff
Split-complementary+150°, +210°#f2feff#fff6ff

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?

LightYellow is a warm color: its hue is 60° 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
cornsilk#fff8dc1.7
lightgoldenrodyellow#fafad22.1
ivory#fffff02.1

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
lime-50#f7fee71.4
yellow-50#fefce81.5
amber-50#fffbeb2.0

Code snippets

CSS
.element {
  color: lightyellow;
  background-color: #ffffe0;
  border-color: rgb(255 255 224);
  outline-color: oklch(99.2% 0.04 107.1);
}
Tailwind CSS
<div class="bg-[#ffffe0] text-black">...</div>

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

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

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

const lightyellow = Color(0xFFFFFFE0);
Android XML
<!-- res/values/colors.xml -->
<color name="lightyellow">#FFFFE0</color>

Frequently asked questions

What is the hex code for lightyellow?
The hex code for lightyellow is #FFFFE0. The same color is rgb(255, 255, 224), hsl(60, 100%, 94%) and oklch(99.2% 0.04 107.1), and in CSS you can also write the keyword lightyellow directly.
Is lightyellow a warm or cool color?
LightYellow is a warm color: its hue is 60° 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 lightyellow?
Rotating the hue in OKLCH while keeping lightness and chroma, lightyellow's complementary color is #FBFAFF (close to ghostwhite), its analogous colors are #FFFADF and #F0FFE9, and its triadic partners are #E6FFFF and #FFF5FF. For text on top, black gives the higher contrast.
Can you use white text on lightyellow?
White text on lightyellow has a contrast ratio of 1.01:1, which fails AA even for large text under WCAG 2.2. Black text reaches 20.63:1 and passes both AA and AAA. In APCA terms that is Lc 0.0 for white and Lc 104.8 for black.
What is the RGB value of lightyellow?
LightYellow is rgb(255, 255, 224): red 255, green 255 and blue 224 on the 0 to 255 scale, or 100.0%, 100.0% and 87.8%. As a decimal integer it is 16777184.

Last reviewed by Arielton Oberek.