#311D81#311D81

#311D81 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.2% C 0.156 H 283.0°. Best body text is #FFFFFF at 12.94:1 contrast (WCAG AA passes).

Color values

HEX#311D81
RGBrgb(49, 29, 129)
HSLhsl(252, 63%, 31%)
HSVhsv(252, 78%, 51%)
CMYKcmyk(62%, 77.5%, 0%, 49.4%)
CIE-LABlab(20.50, 37.99, -52.74)
CIE-LCHlch(20.50, 65.00, 305.77°)
OKLaboklab(33.15% 0.0351 -0.152)
OKLCHoklch(33.15% 0.156 283)
XYZxyz(5.6672, 3.1163, 21.0675)
Luminance0.0312 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D81 #6D811D
analogous
#1D3B81 #311D81 #631D81
triadic
#311D81 #81311D #1D8131
tetradic
#311D81 #811D3B #6D811D #1D8163
square
#311D81 #811D3B #6D811D #1D8163
split-complementary
#311D81 #81631D #3B811D
monochromatic
#0B071D #1E124F #311D81 #4428B3 #6144D5

Accessibility & contrast

On white

12.94
#311D81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#311D81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D81
12.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D81#FFFFFF#000000##FFFFFF
##311D811.0012.941.6212.94
#FFFFFF12.941.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.941.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003484
Deuteranopia (green-blind)
#002E7F
Tritanopia (blue-blind)
#00394E
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311d81;
/* rgb */ color: rgb(49, 29, 129);
/* oklch */ color: oklch(33.2% 0.156 283.0);
Tailwind
colors: {
  custom: {
    50: '#745ca7',
    500: '#311d81',
    950: '#000000',
  },
}
SCSS
$custom: #311d81;
$custom-light: #745ca7;
$custom-dark: #000000;
JSON
{
  "hex": "#311d81",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 129
  },
  "hsl": {
    "h": 252,
    "s": 63.291,
    "l": 30.98
  },
  "oklch": {
    "l": 0.33151,
    "c": 0.15602,
    "h": 283
  },
  "luminance": 0.03117
}

Semantic roles & 50–950 ramp

primary
#311D81
secondary
#9EB446
accent
#E641C5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311D81

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

Preview Lab → · Contrast checker → · Palette generator →

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