#331B99#331B99

#331B99 is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.7% C 0.187 H 279.9°. Best body text is #FFFFFF at 11.95:1 contrast (WCAG AA passes).

Color values

HEX#331B99
RGBrgb(51, 27, 153)
HSLhsl(251, 70%, 35%)
HSVhsv(251, 82%, 60%)
CMYKcmyk(66.7%, 82.4%, 0%, 40%)
CIE-LABlab(22.95, 46.60, -63.65)
CIE-LCHlch(22.95, 78.89, 306.21°)
OKLaboklab(35.68% 0.0322 -0.1838)
OKLCHoklch(35.68% 0.187 279.9)
XYZxyz(7.5051, 3.7870, 30.4663)
Luminance0.0379 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B99 #81991B
analogous
#1B4299 #331B99 #721B99
triadic
#331B99 #99331B #1B9933
tetradic
#331B99 #991B42 #81991B #1B9972
square
#331B99 #991B42 #81991B #1B9972
split-complementary
#331B99 #99721B #42991B
monochromatic
#100931 #221265 #331B99 #4424CD #6A4FE0

Accessibility & contrast

On white

11.95
#331B99 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.76
#331B99 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B99
11.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B99#FFFFFF#000000##FFFFFF
##331B991.0011.951.7611.95
#FFFFFF11.951.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003B9C
Deuteranopia (green-blind)
#003297
Tritanopia (blue-blind)
#00425B
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #331b99;
/* rgb */ color: rgb(51, 27, 153);
/* oklch */ color: oklch(35.7% 0.187 279.9);
Tailwind
colors: {
  custom: {
    50: '#7a5cb8',
    500: '#331b99',
    950: '#000000',
  },
}
SCSS
$custom: #331b99;
$custom-light: #7a5cb8;
$custom-dark: #000000;
JSON
{
  "hex": "#331b99",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 153
  },
  "hsl": {
    "h": 251.429,
    "s": 70,
    "l": 35.294
  },
  "oklch": {
    "l": 0.35681,
    "c": 0.18656,
    "h": 279.9
  },
  "luminance": 0.03788
}

Semantic roles & 50–950 ramp

primary
#331B99
secondary
#ACC24E
accent
#ED3BCB
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #331B99

Body copy rendered with the generated semantic roles for this colour.

Preview Lab → · Contrast checker → · Palette generator →

#331B99 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva