#331B90#331B90

#331B90 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.7% C 0.176 H 281.5°. Best body text is #FFFFFF at 12.35:1 contrast (WCAG AA passes).

Color values

HEX#331B90
RGBrgb(51, 27, 144)
HSLhsl(252, 68%, 34%)
HSVhsv(252, 81%, 56%)
CMYKcmyk(64.6%, 81.3%, 0%, 43.5%)
CIE-LABlab(21.95, 43.90, -59.75)
CIE-LCHlch(21.95, 74.14, 306.30°)
OKLaboklab(34.69% 0.0351 -0.1724)
OKLCHoklch(34.69% 0.176 281.5)
XYZxyz(6.7896, 3.5008, 26.6981)
Luminance0.0350 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B90 #78901B
analogous
#1B3D90 #331B90 #6D1B90
triadic
#331B90 #90331B #1B9033
tetradic
#331B90 #901B3D #78901B #1B906D
square
#331B90 #901B3D #78901B #1B906D
split-complementary
#331B90 #906D1B #3D901B
monochromatic
#0E0829 #21115C #331B90 #4525C4 #6749DD

Accessibility & contrast

On white

12.35
#331B90 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331B90 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B90
12.35:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B90#FFFFFF#000000##FFFFFF
##331B901.0012.351.7012.35
#FFFFFF12.351.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.351.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003893
Deuteranopia (green-blind)
#00308E
Tritanopia (blue-blind)
#003E56
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331b90;
/* rgb */ color: rgb(51, 27, 144);
/* oklch */ color: oklch(34.7% 0.176 281.5);
Tailwind
colors: {
  custom: {
    50: '#785cb2',
    500: '#331b90',
    950: '#000000',
  },
}
SCSS
$custom: #331b90;
$custom-light: #785cb2;
$custom-dark: #000000;
JSON
{
  "hex": "#331b90",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 144
  },
  "hsl": {
    "h": 252.308,
    "s": 68.421,
    "l": 33.529
  },
  "oklch": {
    "l": 0.34687,
    "c": 0.17595,
    "h": 281.5
  },
  "luminance": 0.03501
}

Semantic roles & 50–950 ramp

primary
#331B90
secondary
#A6BF48
accent
#EB3DC7
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331B90

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

Preview Lab → · Contrast checker → · Palette generator →

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