Skip to content

Blue Violet

Hex #8A2BE2, rgb(138 43 226). A purple CSS named color.

Open in palette generator

Blue Violet color codes

Click any value to copy it.

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

About Blue Violet

Blue Violet is a medium vivid purple with the hex code #8A2BE2. In RGB it is made of 138 red, 43 green and 226 blue; in HSL its hue is 271°, with 76% saturation and 53% lightness. Its perceptual lightness (OKLCH L) is 53.4%.

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

Tints, shades and tones

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

Tints (with white)

Shades (with black)

Tones (with gray)

Blue 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 Blue Violet

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

Complementary

Triadic

Split complementary

Tetradic

Square

Monochromatic

Contrast and readability

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

Blue Violet textSmall text on white

On white5.96:1

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

APCA Lc 78

Blue Violet textSmall text on black

On black3.52:1

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

APCA Lc -23

White text on Blue Violet (#FFFFFF)

Test any pair in the contrast checker.

Color blindness preview

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

  • Protanopia#0063E7
  • Deuteranopia#0063DF
  • Tritanopia#765F89
  • Protanomaly#0058E5
  • Deuteranomaly#1B59E0
  • Tritanomaly#8546C0
  • Achromatopsia#646464

Colors similar to Blue Violet

The closest named colors by perceptual difference (OKLab).

Use Blue Violet in CSS and Tailwind

CSS
.blue-violet {
  color: blueviolet; /* #8A2BE2 */
  background-color: rgb(138 43 226);
  border-color: oklch(53.4% 0.25 301.4);
}
Tailwind CSS
/* Tailwind CSS v4: bg-blue-violet-500, text-blue-violet-700... */
@theme {
  --color-blue-violet-50: #FBF9FF;
  --color-blue-violet-100: #F2EBFF;
  --color-blue-violet-200: #E5D6FF;
  --color-blue-violet-300: #D2B7FF;
  --color-blue-violet-400: #BA8AFF;
  --color-blue-violet-500: #AC68FF;
  --color-blue-violet-600: #A043FF;
  --color-blue-violet-700: #8A2BE2;
  --color-blue-violet-800: #6D24B2;
  --color-blue-violet-900: #561E8E;
  --color-blue-violet-950: #20003D;
}

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