#331D88#331D88

#331D88 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.1% C 0.164 H 282.7°. Best body text is #FFFFFF at 12.56:1 contrast (WCAG AA passes).

Color values

HEX#331D88
RGBrgb(51, 29, 136)
HSLhsl(252, 65%, 32%)
HSVhsv(252, 79%, 53%)
CMYKcmyk(62.5%, 78.7%, 0%, 46.7%)
CIE-LABlab(21.43, 40.45, -55.61)
CIE-LCHlch(21.43, 68.77, 306.03°)
OKLaboklab(34.07% 0.0362 -0.1604)
OKLCHoklch(34.07% 0.164 282.7)
XYZxyz(6.2472, 3.3597, 23.6071)
Luminance0.0336 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D88 #72881D
analogous
#1D3D88 #331D88 #681D88
triadic
#331D88 #88331D #1D8833
tetradic
#331D88 #881D3D #72881D #1D8868
square
#331D88 #881D3D #72881D #1D8868
split-complementary
#331D88 #88681D #3D881D
monochromatic
#0D0723 #201256 #331D88 #4628BA #6548D8

Accessibility & contrast

On white

12.56
#331D88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#331D88 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331D88
12.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D88#FFFFFF#000000##FFFFFF
##331D881.0012.561.6712.56
#FFFFFF12.561.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378B
Deuteranopia (green-blind)
#003086
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331d88;
/* rgb */ color: rgb(51, 29, 136);
/* oklch */ color: oklch(34.1% 0.164 282.7);
Tailwind
colors: {
  custom: {
    50: '#765cac',
    500: '#331d88',
    950: '#000000',
  },
}
SCSS
$custom: #331d88;
$custom-light: #765cac;
$custom-dark: #000000;
JSON
{
  "hex": "#331d88",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 136
  },
  "hsl": {
    "h": 252.336,
    "s": 64.848,
    "l": 32.353
  },
  "oklch": {
    "l": 0.34069,
    "c": 0.16441,
    "h": 282.7
  },
  "luminance": 0.0336
}

Semantic roles & 50–950 ramp

primary
#331D88
secondary
#A2BA47
accent
#E840C5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #331D88

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

Preview Lab → · Contrast checker → · Palette generator →

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