Skip to content
Let’s chat ↗

THE COLOR LIBRARY / Cool

Lavender color codes.

The CSS lavender color code is #E6E6FA. Its RGB value is rgb(230, 230, 250) and its HSL value is hsl(240, 66.67%, 94.12%). Start with the exact reference, then choose a shade for the job.

A color name describes a family in everyday language. This page uses the standardized CSS keyword as its reference; your brand’s lavender may be different.

Explore the shades ↓
CSS / lavenderLavender#E6E6FA

COPY. PASTE. MAKE IT YOURS.

Lavender in HEX, RGB, and HSL

HEX#E6E6FA
RGBrgb(230, 230, 250)
HSLhsl(240, 66.67%, 94.12%)

HEX and RGB encode the same sRGB reference. HSL is calculated from it and rounded to two decimals for display. These are screen color values, not a CMYK print specification.

ONE COLOR. DIFFERENT ROLES.

Explore lavender tints and shades

Select a swatch to see its codes and compare text contrast.

UI COLOR SPECIMEN

Make the next step clear.

A label, a surface, and room to breathe.

Selected: Reference

Selected color

Reference · #E6E6FA

rgb(230, 230, 250)hsl(240, 66.67%, 94.12%)

The specimen picks whichever of black or white has higher contrast. It demonstrates a pair, not a complete accessible component.

Illustrative scale: tints mix the reference with white, shades with black, by the stated percentage in encoded sRGB channels. This is not a perceptually uniform scale. Black tints and white shades remain useful; mixing black with black or white with white repeats the reference.

Text contrast on lavender

The table follows your selected swatch, currently #E6E6FA. Decisions use the full calculated ratio; displayed ratios are rounded.

Text against the selected lavender surface
Text colorRatioAA ordinary textAA large text
Black #00000017.06:1Pass · 4.5:1Pass · 3:1
White #FFFFFF1.23:1Fail · 4.5:1Fail · 3:1

Large text is at least 18pt, or 14pt bold. These numeric checks apply to opaque, solid color pairs. Other criteria, states, backgrounds, and exceptions need review. Read W3C’s contrast guidance.

CSS lavender is very light. Adjacent white and lavender surfaces may not make a necessary control boundary visible; use an appropriate border when the boundary matters.

Check a custom color pair ↗

IN A REAL INTERFACE

How to use lavender in product design

Give it one clear role

Lavender can separate a secondary panel or a helpful note from the main canvas. Its quiet appearance works only when the text and interactive boundaries retain enough contrast.

A UI example to try

Place optional setup guidance on a lavender panel with a dark heading and a clearly underlined help link. Keep required errors outside that optional-content treatment.

Work through a real screen

Test lavender as a supporting surface behind a resource card or selected area. Keep body text and interactive elements on tested foreground pairs. The surface should group content without making the whole card look unavailable or reducing the distinction between normal and selected states.

Compare nearby colors by purpose

Compare lavender with purple for action emphasis and gray for a quieter neutral alternative. If the tint is decorative, document that it does not communicate success, failure, or selection by itself.

  1. Choose the role. Decide whether lavender is a surface, foreground, accent, or status. Name the semantic token after that purpose.
  2. Test the actual pair. Compare its foreground and background at the intended size. Test hover, selected, focus, and supported themes independently.
  3. Document the decision. Keep the approved code, usage rule, and contrasting companion together. Preserve labels and non-color cues when communicating a state.

Copy a lavender CSS palette

These numeric names are illustrative palette tokens, not a standard scale. Connect approved values to semantic tokens such as --surface-highlight or --text-primary after testing their pairs.

:root {
  --lavender-100: #FAFAFE;
  --lavender-300: #F0F0FC;
  --lavender-500: #E6E6FA;
  --lavender-700: #ADADBC;
  --lavender-900: #73737D;
}
Download CSS palette ↓

Turn palette values into semantic tokens ↗

Common questions about lavender

What is the HEX code for lavender?

The CSS named color lavender is #E6E6FA. Use that exact value when you want the standardized reference; use your own documented token when you mean a particular brand shade.

Is lavender accessible?

A color by itself cannot pass or fail accessibility. The foreground/background pair, content size, interaction state, and meaning all matter. Use the table above for the selected solid-color pair, then review the complete interface.

Explore related colors