#331D89#331D89

#331D89 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.2% C 0.166 H 282.5°. Best body text is #FFFFFF at 12.52:1 contrast (WCAG AA passes).

Color values

HEX#331D89
RGBrgb(51, 29, 137)
HSLhsl(252, 65%, 33%)
HSVhsv(252, 79%, 54%)
CMYKcmyk(62.8%, 78.8%, 0%, 46.3%)
CIE-LABlab(21.54, 40.76, -56.07)
CIE-LCHlch(21.54, 69.32, 306.01°)
OKLaboklab(34.17% 0.0359 -0.1617)
OKLCHoklch(34.17% 0.166 282.5)
XYZxyz(6.3186, 3.3882, 23.9831)
Luminance0.0339 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D89 #73891D
analogous
#1D3D89 #331D89 #691D89
triadic
#331D89 #89331D #1D8933
tetradic
#331D89 #891D3D #73891D #1D8969
square
#331D89 #891D3D #73891D #1D8969
split-complementary
#331D89 #89691D #3D891D
monochromatic
#0D0824 #201256 #331D89 #4628BC #6548D8

Accessibility & contrast

On white

12.52
#331D89 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#331D89 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D89
12.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D89#FFFFFF#000000##FFFFFF
##331D891.0012.521.6812.52
#FFFFFF12.521.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378C
Deuteranopia (green-blind)
#003087
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331d89;
/* rgb */ color: rgb(51, 29, 137);
/* oklch */ color: oklch(34.2% 0.166 282.5);
Tailwind
colors: {
  custom: {
    50: '#765cad',
    500: '#331d89',
    950: '#000000',
  },
}
SCSS
$custom: #331d89;
$custom-light: #765cad;
$custom-dark: #000000;
JSON
{
  "hex": "#331d89",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 137
  },
  "hsl": {
    "h": 252.222,
    "s": 65.06,
    "l": 32.549
  },
  "oklch": {
    "l": 0.34175,
    "c": 0.16564,
    "h": 282.5
  },
  "luminance": 0.03389
}

Semantic roles & 50–950 ramp

primary
#331D89
secondary
#A3BA47
accent
#E840C6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331D89

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

Preview Lab → · Contrast checker → · Palette generator →

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