#331B95#331B95

#331B95 is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.2% C 0.182 H 280.6°. Best body text is #FFFFFF at 12.13:1 contrast (WCAG AA passes).

Color values

HEX#331B95
RGBrgb(51, 27, 149)
HSLhsl(252, 69%, 35%)
HSVhsv(252, 82%, 58%)
CMYKcmyk(65.8%, 81.9%, 0%, 41.6%)
CIE-LABlab(22.50, 45.40, -61.93)
CIE-LCHlch(22.50, 76.79, 306.25°)
OKLaboklab(35.24% 0.0335 -0.1787)
OKLCHoklch(35.24% 0.182 280.6)
XYZxyz(7.1803, 3.6570, 28.7554)
Luminance0.0366 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B95 #7D951B
analogous
#1B4095 #331B95 #701B95
triadic
#331B95 #95331B #1B9533
tetradic
#331B95 #951B40 #7D951B #1B9570
square
#331B95 #951B40 #7D951B #1B9570
split-complementary
#331B95 #95701B #40951B
monochromatic
#10082D #211261 #331B95 #4524C9 #694CDF

Accessibility & contrast

On white

12.13
#331B95 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B95
12.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B95#FFFFFF#000000##FFFFFF
##331B951.0012.131.7312.13
#FFFFFF12.131.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003A98
Deuteranopia (green-blind)
#003193
Tritanopia (blue-blind)
#004059
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #331b95;
/* rgb */ color: rgb(51, 27, 149);
/* oklch */ color: oklch(35.2% 0.182 280.6);
Tailwind
colors: {
  custom: {
    50: '#795cb5',
    500: '#331b95',
    950: '#000000',
  },
}
SCSS
$custom: #331b95;
$custom-light: #795cb5;
$custom-dark: #000000;
JSON
{
  "hex": "#331b95",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 149
  },
  "hsl": {
    "h": 251.803,
    "s": 69.318,
    "l": 34.51
  },
  "oklch": {
    "l": 0.35237,
    "c": 0.18186,
    "h": 280.6
  },
  "luminance": 0.03658
}

Semantic roles & 50–950 ramp

primary
#331B95
secondary
#AAC14B
accent
#EC3CC9
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331B95

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

Preview Lab → · Contrast checker → · Palette generator →

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