#331B9A#331B9A

#331B9A is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.8% C 0.188 H 279.8°. Best body text is #FFFFFF at 11.90:1 contrast (WCAG AA passes).

Color values

HEX#331B9A
RGBrgb(51, 27, 154)
HSLhsl(251, 70%, 35%)
HSVhsv(251, 82%, 60%)
CMYKcmyk(66.9%, 82.5%, 0%, 39.6%)
CIE-LABlab(23.07, 46.90, -64.08)
CIE-LCHlch(23.07, 79.41, 306.20°)
OKLaboklab(35.79% 0.0319 -0.185)
OKLCHoklch(35.79% 0.188 279.8)
XYZxyz(7.5880, 3.8201, 30.9031)
Luminance0.0382 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B9A #829A1B
analogous
#1B429A #331B9A #731B9A
triadic
#331B9A #9A331B #1B9A33
tetradic
#331B9A #9A1B42 #829A1B #1B9A73
square
#331B9A #9A1B42 #829A1B #1B9A73
split-complementary
#331B9A #9A731B #429A1B
monochromatic
#110932 #221266 #331B9A #4424CE #6B4FE0

Accessibility & contrast

On white

11.90
#331B9A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B9A
11.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B9A#FFFFFF#000000##FFFFFF
##331B9A1.0011.901.7611.90
#FFFFFF11.901.0021.001.00
#0000001.7621.001.0021.00
##FFFFFF11.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003C9D
Deuteranopia (green-blind)
#003298
Tritanopia (blue-blind)
#00435C
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #331b9a;
/* rgb */ color: rgb(51, 27, 154);
/* oklch */ color: oklch(35.8% 0.188 279.8);
Tailwind
colors: {
  custom: {
    50: '#7a5cb9',
    500: '#331b9a',
    950: '#000000',
  },
}
SCSS
$custom: #331b9a;
$custom-light: #7a5cb9;
$custom-dark: #000000;
JSON
{
  "hex": "#331b9a",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 154
  },
  "hsl": {
    "h": 251.339,
    "s": 70.166,
    "l": 35.49
  },
  "oklch": {
    "l": 0.35793,
    "c": 0.18773,
    "h": 279.8
  },
  "luminance": 0.03821
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #331B9A

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

Preview Lab → · Contrast checker → · Palette generator →

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