#311D87#311D87

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

Color values

HEX#311D87
RGBrgb(49, 29, 135)
HSLhsl(251, 65%, 32%)
HSVhsv(251, 79%, 53%)
CMYKcmyk(63.7%, 78.5%, 0%, 47.1%)
CIE-LABlab(21.13, 39.88, -55.48)
CIE-LCHlch(21.13, 68.33, 305.71°)
OKLaboklab(33.78% 0.0334 -0.16)
OKLCHoklch(33.78% 0.163 281.8)
XYZxyz(6.0778, 3.2805, 23.2299)
Luminance0.0328 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D87 #73871D
analogous
#1D3E87 #311D87 #661D87
triadic
#311D87 #87311D #1D8731
tetradic
#311D87 #871D3E #73871D #1D8766
square
#311D87 #871D3E #73871D #1D8766
split-complementary
#311D87 #87661D #3E871D
monochromatic
#0C0722 #1F1255 #311D87 #4328B9 #6247D7

Accessibility & contrast

On white

12.68
#311D87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#311D87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D87
12.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D87#FFFFFF#000000##FFFFFF
##311D871.0012.681.6612.68
#FFFFFF12.681.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.681.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #311d87;
/* rgb */ color: rgb(49, 29, 135);
/* oklch */ color: oklch(33.8% 0.163 281.8);
Tailwind
colors: {
  custom: {
    50: '#755cab',
    500: '#311d87',
    950: '#000000',
  },
}
SCSS
$custom: #311d87;
$custom-light: #755cab;
$custom-dark: #000000;
JSON
{
  "hex": "#311d87",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 135
  },
  "hsl": {
    "h": 251.321,
    "s": 64.634,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33783,
    "c": 0.16349,
    "h": 281.8
  },
  "luminance": 0.03281
}

Semantic roles & 50–950 ramp

primary
#311D87
secondary
#A4B946
accent
#E840C8
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311D87

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

Preview Lab → · Contrast checker → · Palette generator →

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