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.
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
| CSS keyword | lavender |
|---|---|
| HEX | #E6E6FA |
| RGB | rgb(230, 230, 250) |
| HSL | hsl(240, 67%, 94%) |
| HWB | hwb(240 90% 2%) |
| OKLCH | oklch(93.1% 0.027 285.9) |
| CMYK (naive, no ICC profile) | cmyk(8%, 8%, 0%, 2%) |
| Decimal | 15,132,410 |
| Hue family | Purples 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.
| Pair | Ratio | AA | AA large | AAA | AAA large | APCA Lc |
|---|---|---|---|---|---|---|
| Black text on lavender | 17.06:1 | Pass | Pass | Pass | Pass | 92.2 |
| White text on lavender | 1.23:1 | Fail | Fail | Fail | Fail | −13.2 |
| Lavender text on white | 1.23:1 | Fail | Fail | Fail | Fail | 11.4 |
| Lavender text on black | 17.06:1 | Pass | Pass | Pass | Pass | −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)
- 5%
#e7e7fa - 15%
#eaeafb - 25%
#ececfb - 35%
#efeffc - 45%
#f1f1fc - 55%
#f4f4fd - 65%
#f6f6fd - 75%
#f9f9fe - 85%
#fbfbfe - 95%
#fefeff
Shades (mixed with black)
- 5%
#dbdbee - 15%
#c4c4d5 - 25%
#adadbc - 35%
#9696a3 - 45%
#7f7f8a - 55%
#676770 - 65%
#515158 - 75%
#3a3a3f - 85%
#232326 - 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.
| Harmony | Rotation | Color |
|---|---|---|
| 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
| Color | HEX | ΔE OK |
|---|---|---|
| mistyrose | #ffe4e1 | 4.4 |
| gainsboro | #dcdcdc | 4.5 |
| lavenderblush | #fff0f5 | 4.6 |
Nearest Tailwind v4 colors
| Color | HEX | ΔE OK |
|---|---|---|
| indigo-100 | #e0e7ff | 1.0 |
| violet-100 | #ede9fe | 1.3 |
| blue-100 | #dbeafe | 1.6 |
Code snippets
.element {
color: lavender;
background-color: #e6e6fa;
border-color: rgb(230 230 250);
outline-color: oklch(93.1% 0.027 285.9);
}<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 */import SwiftUI
extension Color {
static let lavender = Color(red: 0.902, green: 0.902, blue: 0.980)
}import androidx.compose.ui.graphics.Color
val Lavender = Color(0xFFE6E6FA)import 'package:flutter/material.dart';
const lavender = Color(0xFFE6E6FA);<!-- 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.