#331B96#331B96

#331B96 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.3% C 0.183 H 280.4°. Best body text is #FFFFFF at 12.08:1 contrast (WCAG AA passes).

Color values

HEX#331B96
RGBrgb(51, 27, 150)
HSLhsl(252, 69%, 35%)
HSVhsv(252, 82%, 59%)
CMYKcmyk(66%, 82%, 0%, 41.2%)
CIE-LABlab(22.62, 45.70, -62.36)
CIE-LCHlch(22.62, 77.32, 306.24°)
OKLaboklab(35.35% 0.0332 -0.18)
OKLCHoklch(35.35% 0.183 280.4)
XYZxyz(7.2604, 3.6891, 29.1777)
Luminance0.0369 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B96 #7E961B
analogous
#1B4196 #331B96 #701B96
triadic
#331B96 #96331B #1B9633
tetradic
#331B96 #961B41 #7E961B #1B9670
square
#331B96 #961B41 #7E961B #1B9670
split-complementary
#331B96 #96701B #41961B
monochromatic
#10082E #211262 #331B96 #4524CA #694DDF

Accessibility & contrast

On white

12.08
#331B96 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.74
#331B96 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B96
12.08:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B96#FFFFFF#000000##FFFFFF
##331B961.0012.081.7412.08
#FFFFFF12.081.0021.001.00
#0000001.7421.001.0021.00
##FFFFFF12.081.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A99
Deuteranopia (green-blind)
#003194
Tritanopia (blue-blind)
#004159
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #331b96;
/* rgb */ color: rgb(51, 27, 150);
/* oklch */ color: oklch(35.3% 0.183 280.4);
Tailwind
colors: {
  custom: {
    50: '#795cb6',
    500: '#331b96',
    950: '#000000',
  },
}
SCSS
$custom: #331b96;
$custom-light: #795cb6;
$custom-dark: #000000;
JSON
{
  "hex": "#331b96",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 150
  },
  "hsl": {
    "h": 251.707,
    "s": 69.492,
    "l": 34.706
  },
  "oklch": {
    "l": 0.35348,
    "c": 0.18304,
    "h": 280.4
  },
  "luminance": 0.0369
}

Semantic roles & 50–950 ramp

primary
#331B96
secondary
#AAC14C
accent
#EC3BCA
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331B96

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

Preview Lab → · Contrast checker → · Palette generator →

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