Skip to content

CSS named color

Lavender #E6E6FA

Lavender (CSS keyword lavender) has the hex code #E6E6FA and the RGB value rgb(230, 230, 250): an off-white with a blue tint.

Lavender#E6E6FA

Named after the lavender flower, but the CSS value (#e6e6fa) is a very pale bluish lilac, much lighter than the flower itself. It is popular as a soft background tint.

Color codes for Lavender

Color codes for Lavender
CSS keywordlavender
HEX#E6E6FA
RGBrgb(230, 230, 250)
HSLhsl(240, 67%, 94%)
HWBhwb(240 90% 2%)
OKLCHoklch(93.1% 0.027 285.9)
CMYK (naive, no ICC profile)cmyk(8%, 8%, 0%, 2%)
Decimal15,132,410
Hue familyPurples and violets

Contrast and accessibility

On lavender, black text has a contrast ratio of 17.06: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 lavender17.06:1PassPassPassPass92.2
White text on lavender1.23:1FailFailFailFail−13.2
Lavender text on white1.23:1FailFailFailFail11.4
Lavender text on black17.06:1PassPassPassPass−92.6

Tints and shades

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

Tints (mixed with white)

  1. 5%
    #e7e7fa
  2. 15%
    #eaeafb
  3. 25%
    #ececfb
  4. 35%
    #efeffc
  5. 45%
    #f1f1fc
  6. 55%
    #f4f4fd
  7. 65%
    #f6f6fd
  8. 75%
    #f9f9fe
  9. 85%
    #fbfbfe
  10. 95%
    #fefeff

Shades (mixed with black)

  1. 5%
    #dbdbee
  2. 15%
    #c4c4d5
  3. 25%
    #adadbc
  4. 35%
    #9696a3
  5. 45%
    #7f7f8a
  6. 55%
    #676770
  7. 65%
    #515158
  8. 75%
    #3a3a3f
  9. 85%
    #232326
  10. 95%
    #0c0c0d

Color harmonies

Rotating the hue in OKLCH while keeping lightness and chroma, lavender's complementary color is #EAEAD5 (close to antiquewhite), its analogous colors are #DDE9FB and #EFE3F5, and its triadic partners are #F9E3D9 and #D8EEE4. For text on top, black gives the higher contrast.

Color harmonies
HarmonyRotationColor
Complementary+180°#eaead5
Analogous−30°, +30°#dde9fb#efe3f5
Triadic+120°, +240°#f9e3d9#d8eee4
Split-complementary+150°, +210°#f3e6d5#e0eddb

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?

Lavender is close to neutral: its OKLCH chroma is only 0.027, so its temperature comes from context. The faint 240° hue gives it a slightly cool cast.

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
mistyrose#ffe4e14.4
gainsboro#dcdcdc4.5
lavenderblush#fff0f54.6

Nearest Tailwind v4 colors

Nearest Tailwind v4 colors
ColorHEXΔE OK
indigo-100#e0e7ff1.0
violet-100#ede9fe1.3
blue-100#dbeafe1.6

Code snippets

CSS
.element {
  color: lavender;
  background-color: #e6e6fa;
  border-color: rgb(230 230 250);
  outline-color: oklch(93.1% 0.027 285.9);
}
Tailwind CSS
<div class="bg-[#e6e6fa] text-black">...</div>

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

extension Color {
  static let lavender = Color(red: 0.902, green: 0.902, blue: 0.980)
}
Jetpack Compose
import androidx.compose.ui.graphics.Color

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

const lavender = Color(0xFFE6E6FA);
Android XML
<!-- res/values/colors.xml -->
<color name="lavender">#E6E6FA</color>

Frequently asked questions

What is the hex code for lavender?
The hex code for lavender is #E6E6FA. The same color is rgb(230, 230, 250), hsl(240, 67%, 94%) and oklch(93.1% 0.027 285.9), and in CSS you can also write the keyword lavender directly.
Is lavender a warm or cool color?
Lavender is close to neutral: its OKLCH chroma is only 0.027, so its temperature comes from context. The faint 240° hue gives it a slightly cool cast.
What colors go with lavender?
Rotating the hue in OKLCH while keeping lightness and chroma, lavender's complementary color is #EAEAD5 (close to antiquewhite), its analogous colors are #DDE9FB and #EFE3F5, and its triadic partners are #F9E3D9 and #D8EEE4. For text on top, black gives the higher contrast.
Can you use white text on lavender?
White text on lavender has a contrast ratio of 1.23:1, which fails AA even for large text under WCAG 2.2. Black text reaches 17.06:1 and passes both AA and AAA. In APCA terms that is Lc −13.2 for white and Lc 92.2 for black.
What is the RGB value of lavender?
Lavender is rgb(230, 230, 250): red 230, green 230 and blue 250 on the 0 to 255 scale, or 90.2%, 90.2% and 98.0%. As a decimal integer it is 15132410.

Last reviewed by Arielton Oberek.