#331D87#331D87

#331D87 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.0% C 0.163 H 282.9°. Best body text is #FFFFFF at 12.60:1 contrast (WCAG AA passes).

Color values

HEX#331D87
RGBrgb(51, 29, 135)
HSLhsl(252, 65%, 32%)
HSVhsv(252, 79%, 53%)
CMYKcmyk(62.2%, 78.5%, 0%, 47.1%)
CIE-LABlab(21.32, 40.13, -55.16)
CIE-LCHlch(21.32, 68.22, 306.04°)
OKLaboklab(33.96% 0.0365 -0.159)
OKLCHoklch(33.96% 0.163 282.9)
XYZxyz(6.1764, 3.3314, 23.2345)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331D87 #71871D
analogous
#1D3C87 #331D87 #681D87
triadic
#331D87 #87331D #1D8733
tetradic
#331D87 #871D3C #71871D #1D8768
square
#331D87 #871D3C #71871D #1D8768
split-complementary
#331D87 #87681D #3C871D
monochromatic
#0D0722 #201255 #331D87 #4628B9 #6547D7

Accessibility & contrast

On white

12.60
#331D87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331D87
12.60:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331D87#FFFFFF#000000##FFFFFF
##331D871.0012.601.6712.60
#FFFFFF12.601.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.601.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368A
Deuteranopia (green-blind)
#003085
Tritanopia (blue-blind)
#003C51
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331d87;
/* rgb */ color: rgb(51, 29, 135);
/* oklch */ color: oklch(34.0% 0.163 282.9);
Tailwind
colors: {
  custom: {
    50: '#765cab',
    500: '#331d87',
    950: '#000000',
  },
}
SCSS
$custom: #331d87;
$custom-light: #765cab;
$custom-dark: #000000;
JSON
{
  "hex": "#331d87",
  "rgb": {
    "r": 51,
    "g": 29,
    "b": 135
  },
  "hsl": {
    "h": 252.453,
    "s": 64.634,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33963,
    "c": 0.16318,
    "h": 282.9
  },
  "luminance": 0.03332
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #331D87

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

Preview Lab → · Contrast checker → · Palette generator →

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