#331B93#331B93

#331B93 is a dark, vivid violet. Relative luminance 0.036; OKLCH L 35.0% C 0.179 H 281.0°. Best body text is #FFFFFF at 12.22:1 contrast (WCAG AA passes).

Color values

HEX#331B93
RGBrgb(51, 27, 147)
HSLhsl(252, 69%, 34%)
HSVhsv(252, 82%, 58%)
CMYKcmyk(65.3%, 81.6%, 0%, 42.4%)
CIE-LABlab(22.28, 44.80, -61.06)
CIE-LCHlch(22.28, 75.74, 306.27°)
OKLaboklab(35.02% 0.0341 -0.1762)
OKLCHoklch(35.02% 0.18 281)
XYZxyz(7.0220, 3.5937, 27.9217)
Luminance0.0359 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B93 #7B931B
analogous
#1B3F93 #331B93 #6F1B93
triadic
#331B93 #93331B #1B9333
tetradic
#331B93 #931B3F #7B931B #1B936F
square
#331B93 #931B3F #7B931B #1B936F
split-complementary
#331B93 #936F1B #3F931B
monochromatic
#0F082C #21125F #331B93 #4524C7 #684BDE

Accessibility & contrast

On white

12.22
#331B93 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#331B93 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B93
12.22:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B93#FFFFFF#000000##FFFFFF
##331B931.0012.221.7212.22
#FFFFFF12.221.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.221.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003996
Deuteranopia (green-blind)
#003191
Tritanopia (blue-blind)
#004057
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331b93;
/* rgb */ color: rgb(51, 27, 147);
/* oklch */ color: oklch(35.0% 0.179 281.0);
Tailwind
colors: {
  custom: {
    50: '#795cb4',
    500: '#331b93',
    950: '#000000',
  },
}
SCSS
$custom: #331b93;
$custom-light: #795cb4;
$custom-dark: #000000;
JSON
{
  "hex": "#331b93",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 147
  },
  "hsl": {
    "h": 252,
    "s": 68.966,
    "l": 34.118
  },
  "oklch": {
    "l": 0.35016,
    "c": 0.1795,
    "h": 281
  },
  "luminance": 0.03594
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #331B93

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

Preview Lab → · Contrast checker → · Palette generator →

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