#311D88#311D88

#311D88 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.9% C 0.165 H 281.6°. Best body text is #FFFFFF at 12.64:1 contrast (WCAG AA passes).

Color values

HEX#311D88
RGBrgb(49, 29, 136)
HSLhsl(251, 65%, 32%)
HSVhsv(251, 79%, 53%)
CMYKcmyk(64%, 78.7%, 0%, 46.7%)
CIE-LABlab(21.24, 40.20, -55.93)
CIE-LCHlch(21.24, 68.88, 305.70°)
OKLaboklab(33.89% 0.0331 -0.1614)
OKLCHoklch(33.89% 0.165 281.6)
XYZxyz(6.1485, 3.3088, 23.6024)
Luminance0.0331 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D88 #74881D
analogous
#1D3F88 #311D88 #671D88
triadic
#311D88 #88311D #1D8831
tetradic
#311D88 #881D3F #74881D #1D8867
square
#311D88 #881D3F #74881D #1D8867
split-complementary
#311D88 #88671D #3F881D
monochromatic
#0D0723 #1F1256 #311D88 #4328BA #6348D8

Accessibility & contrast

On white

12.64
#311D88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311D88
12.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D88#FFFFFF#000000##FFFFFF
##311D881.0012.641.6612.64
#FFFFFF12.641.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378B
Deuteranopia (green-blind)
#002F86
Tritanopia (blue-blind)
#003C52
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #311d88;
/* rgb */ color: rgb(49, 29, 136);
/* oklch */ color: oklch(33.9% 0.165 281.6);
Tailwind
colors: {
  custom: {
    50: '#755cac',
    500: '#311d88',
    950: '#000000',
  },
}
SCSS
$custom: #311d88;
$custom-light: #755cac;
$custom-dark: #000000;
JSON
{
  "hex": "#311d88",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 136
  },
  "hsl": {
    "h": 251.215,
    "s": 64.848,
    "l": 32.353
  },
  "oklch": {
    "l": 0.33889,
    "c": 0.16473,
    "h": 281.6
  },
  "luminance": 0.03309
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #311D88

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

Preview Lab → · Contrast checker → · Palette generator →

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