#311C88#311C88

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

Color values

HEX#311C88
RGBrgb(49, 28, 136)
HSLhsl(252, 66%, 32%)
HSVhsv(252, 79%, 53%)
CMYKcmyk(64%, 79.4%, 0%, 46.7%)
CIE-LABlab(21.06, 40.72, -56.23)
CIE-LCHlch(21.06, 69.43, 305.91°)
OKLaboklab(33.76% 0.0338 -0.1622)
OKLCHoklch(33.76% 0.166 281.8)
XYZxyz(6.1244, 3.2606, 23.5944)
Luminance0.0326 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C88 #73881C
analogous
#1C3D88 #311C88 #671C88
triadic
#311C88 #88311C #1C8831
tetradic
#311C88 #881C3D #73881C #1C8867
square
#311C88 #881C3D #73881C #1C8867
split-complementary
#311C88 #88671C #3D881C
monochromatic
#0C0722 #1F1255 #311C88 #4326BB #6246D9

Accessibility & contrast

On white

12.71
#311C88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#311C88 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C88
12.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C88#FFFFFF#000000##FFFFFF
##311C881.0012.711.6512.71
#FFFFFF12.711.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.711.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #311c88;
/* rgb */ color: rgb(49, 28, 136);
/* oklch */ color: oklch(33.8% 0.166 281.8);
Tailwind
colors: {
  custom: {
    50: '#755cac',
    500: '#311c88',
    950: '#000000',
  },
}
SCSS
$custom: #311c88;
$custom-light: #755cac;
$custom-dark: #000000;
JSON
{
  "hex": "#311c88",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 136
  },
  "hsl": {
    "h": 251.667,
    "s": 65.854,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33762,
    "c": 0.16571,
    "h": 281.8
  },
  "luminance": 0.03261
}

Semantic roles & 50–950 ramp

primary
#311C88
secondary
#A4BA45
accent
#E93FC8
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311C88

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

Preview Lab → · Contrast checker → · Palette generator →

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