#331B94#331B94

#331B94 is a dark, vivid violet. Relative luminance 0.036; OKLCH L 35.1% C 0.181 H 280.8°. Best body text is #FFFFFF at 12.17:1 contrast (WCAG AA passes).

Color values

HEX#331B94
RGBrgb(51, 27, 148)
HSLhsl(252, 69%, 34%)
HSVhsv(252, 82%, 58%)
CMYKcmyk(65.5%, 81.8%, 0%, 42%)
CIE-LABlab(22.39, 45.10, -61.50)
CIE-LCHlch(22.39, 76.27, 306.26°)
OKLaboklab(35.13% 0.0338 -0.1775)
OKLCHoklch(35.13% 0.181 280.8)
XYZxyz(7.1008, 3.6252, 28.3368)
Luminance0.0363 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B94 #7C941B
analogous
#1B4094 #331B94 #701B94
triadic
#331B94 #94331B #1B9433
tetradic
#331B94 #941B40 #7C941B #1B9470
square
#331B94 #941B40 #7C941B #1B9470
split-complementary
#331B94 #94701B #40941B
monochromatic
#0F082C #211260 #331B94 #4524C8 #684BDE

Accessibility & contrast

On white

12.17
#331B94 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#331B94 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B94
12.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B94#FFFFFF#000000##FFFFFF
##331B941.0012.171.7312.17
#FFFFFF12.171.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A97
Deuteranopia (green-blind)
#003192
Tritanopia (blue-blind)
#004058
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #331b94;
/* rgb */ color: rgb(51, 27, 148);
/* oklch */ color: oklch(35.1% 0.181 280.8);
Tailwind
colors: {
  custom: {
    50: '#795cb5',
    500: '#331b94',
    950: '#000000',
  },
}
SCSS
$custom: #331b94;
$custom-light: #795cb5;
$custom-dark: #000000;
JSON
{
  "hex": "#331b94",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 148
  },
  "hsl": {
    "h": 251.901,
    "s": 69.143,
    "l": 34.314
  },
  "oklch": {
    "l": 0.35126,
    "c": 0.18068,
    "h": 280.8
  },
  "luminance": 0.03626
}

Semantic roles & 50–950 ramp

primary
#331B94
secondary
#A9C04B
accent
#EC3CC9
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331B94

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

Preview Lab → · Contrast checker → · Palette generator →

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