#311D8D#311D8D

#311D8D is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.4% C 0.171 H 280.7°. Best body text is #FFFFFF at 12.42:1 contrast (WCAG AA passes).

Color values

HEX#311D8D
RGBrgb(49, 29, 141)
HSLhsl(251, 66%, 33%)
HSVhsv(251, 79%, 55%)
CMYKcmyk(65.2%, 79.4%, 0%, 44.7%)
CIE-LABlab(21.78, 41.76, -58.17)
CIE-LCHlch(21.78, 71.61, 305.67°)
OKLaboklab(34.43% 0.0317 -0.1679)
OKLCHoklch(34.43% 0.171 280.7)
XYZxyz(6.5122, 3.4543, 25.5177)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D8D #798D1D
analogous
#1D418D #311D8D #691D8D
triadic
#311D8D #8D311D #1D8D31
tetradic
#311D8D #8D1D41 #798D1D #1D8D69
square
#311D8D #8D1D41 #798D1D #1D8D69
split-complementary
#311D8D #8D691D #418D1D
monochromatic
#0E0827 #1F135A #311D8D #4327C0 #644BDA

Accessibility & contrast

On white

12.42
#311D8D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#311D8D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D8D
12.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D8D#FFFFFF#000000##FFFFFF
##311D8D1.0012.421.6912.42
#FFFFFF12.421.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003890
Deuteranopia (green-blind)
#00308B
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311d8d;
/* rgb */ color: rgb(49, 29, 141);
/* oklch */ color: oklch(34.4% 0.171 280.7);
Tailwind
colors: {
  custom: {
    50: '#765caf',
    500: '#311d8d',
    950: '#000000',
  },
}
SCSS
$custom: #311d8d;
$custom-light: #765caf;
$custom-dark: #000000;
JSON
{
  "hex": "#311d8d",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 141
  },
  "hsl": {
    "h": 250.714,
    "s": 65.882,
    "l": 33.333
  },
  "oklch": {
    "l": 0.34426,
    "c": 0.17086,
    "h": 280.7
  },
  "luminance": 0.03455
}

Semantic roles & 50–950 ramp

primary
#311D8D
secondary
#A8BC4A
accent
#E93FCA
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311D8D

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

Preview Lab → · Contrast checker → · Palette generator →

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