Skip to content

Violet

Hex #EE82EE, rgb(238 130 238). A purple CSS named color.

Open in palette generator

Violet color codes

Click any value to copy it.

HEX
RGB
HSL
HSV
HWB
CMYK
OKLCH
OKLab
Lab
LCH
CSS keyword

About Violet

Violet is a light saturated purple with the hex code #EE82EE. In RGB it is made of 238 red, 130 green and 238 blue; in HSL its hue is 300°, with 76% saturation and 72% lightness. Its perceptual lightness (OKLCH L) is 76.2%.

It is a CSS named color, so you can write "violet" anywhere CSS accepts a color. Against white it has a contrast ratio of 2.32:1 and against black 9.06:1, so black text reads better on it and passes WCAG AA for normal text.

Tints, shades and tones

Violet mixed step by step with white, black and middle gray (#808080).

Tints (with white)

Shades (with black)

Tones (with gray)

Violet 50-950 scale

A Tailwind-style scale built in OKLCH; the original color sits on the step with the closest lightness.

Colors that go with Violet

Color harmonies rotate the hue in OKLCH and keep the lightness and chroma. Each color links to its closest named color.

Complementary

Analogous

Triadic

Split complementary

Tetradic

Monochromatic

Contrast and readability

WCAG 2 contrast of Violet with white and black. The readable text color on Violet is black.

Violet textSmall text on white

On white2.32:1

  • AA fail
  • AA Large fail
  • AAA fail
  • UI 3:1 fail

APCA Lc 45

Violet textSmall text on black

On black9.06:1

  • AA pass
  • AA Large pass
  • AAA pass
  • UI 3:1 pass

APCA Lc -57

Black text on Violet (#000000)

Test any pair in the contrast checker.

Color blindness preview

How Violet appears with each type of color vision deficiency (simulated with the Machado model).

  • Protanopia#79A1F2
  • Deuteranopia#97AFEB
  • Tritanopia#F48DAD
  • Protanomaly#A49CF0
  • Deuteranomaly#AFA5EC
  • Tritanomaly#F287D3
  • Achromatopsia#AAAAAA

Colors similar to Violet

The closest named colors by perceptual difference (OKLab).

Use Violet in CSS and Tailwind

CSS
.violet {
  color: violet; /* #EE82EE */
  background-color: rgb(238 130 238);
  border-color: oklch(76.2% 0.186 327.2);
}
Tailwind CSS
/* Tailwind CSS v4: bg-violet-500, text-violet-700... */
@theme {
  --color-violet-50: #FFF7FF;
  --color-violet-100: #FFDEFD;
  --color-violet-200: #F8BCF6;
  --color-violet-300: #EE82EE;
  --color-violet-400: #E422E8;
  --color-violet-500: #C800CC;
  --color-violet-600: #AD00B0;
  --color-violet-700: #8D0090;
  --color-violet-800: #720075;
  --color-violet-900: #5F0061;
  --color-violet-950: #2A002B;
}

<!-- or the exact color, no config -->
<div class="bg-[#EE82EE] text-[#000000]">…</div>