#311D82#311D82

#311D82 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.157 H 282.8°. Best body text is #FFFFFF at 12.89:1 contrast (WCAG AA passes).

Color values

HEX#311D82
RGBrgb(49, 29, 130)
HSLhsl(252, 64%, 31%)
HSVhsv(252, 78%, 51%)
CMYKcmyk(62.3%, 77.7%, 0%, 49%)
CIE-LABlab(20.61, 38.31, -53.20)
CIE-LCHlch(20.61, 65.56, 305.76°)
OKLaboklab(33.26% 0.0348 -0.1534)
OKLCHoklch(33.26% 0.157 282.8)
XYZxyz(5.7340, 3.1430, 21.4193)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D82 #6E821D
analogous
#1D3B82 #311D82 #631D82
triadic
#311D82 #82311D #1D8231
tetradic
#311D82 #821D3B #6E821D #1D8263
square
#311D82 #821D3B #6E821D #1D8263
split-complementary
#311D82 #82631D #3B821D
monochromatic
#0B071E #1E1250 #311D82 #4428B4 #6144D5

Accessibility & contrast

On white

12.89
#311D82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#311D82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D82
12.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D82#FFFFFF#000000##FFFFFF
##311D821.0012.891.6312.89
#FFFFFF12.891.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003585
Deuteranopia (green-blind)
#002E80
Tritanopia (blue-blind)
#003A4E
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311d82;
/* rgb */ color: rgb(49, 29, 130);
/* oklch */ color: oklch(33.3% 0.157 282.8);
Tailwind
colors: {
  custom: {
    50: '#745ca7',
    500: '#311d82',
    950: '#000000',
  },
}
SCSS
$custom: #311d82;
$custom-light: #745ca7;
$custom-dark: #000000;
JSON
{
  "hex": "#311d82",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 130
  },
  "hsl": {
    "h": 251.881,
    "s": 63.522,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33255,
    "c": 0.15728,
    "h": 282.8
  },
  "luminance": 0.03143
}

Semantic roles & 50–950 ramp

primary
#311D82
secondary
#9FB546
accent
#E741C6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311D82

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

Preview Lab → · Contrast checker → · Palette generator →

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