#311B87#311B87

#311B87 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.165 H 282.1°. Best body text is #FFFFFF at 12.83:1 contrast (WCAG AA passes).

Color values

HEX#311B87
RGBrgb(49, 27, 135)
HSLhsl(252, 67%, 32%)
HSVhsv(252, 80%, 53%)
CMYKcmyk(63.7%, 80%, 0%, 47.1%)
CIE-LABlab(20.77, 40.92, -56.08)
CIE-LCHlch(20.77, 69.42, 306.12°)
OKLaboklab(33.53% 0.0347 -0.1618)
OKLCHoklch(33.53% 0.165 282.1)
XYZxyz(6.0304, 3.1857, 23.2141)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B87 #71871B
analogous
#1B3B87 #311B87 #671B87
triadic
#311B87 #87311B #1B8731
tetradic
#311B87 #871B3B #71871B #1B8767
square
#311B87 #871B3B #71871B #1B8767
split-complementary
#311B87 #87671B #3B871B
monochromatic
#0C0721 #1E1154 #311B87 #4425BA #6243D9

Accessibility & contrast

On white

12.83
#311B87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#311B87 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B87
12.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B87#FFFFFF#000000##FFFFFF
##311B871.0012.831.6412.83
#FFFFFF12.831.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358A
Deuteranopia (green-blind)
#002E85
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311b87;
/* rgb */ color: rgb(49, 27, 135);
/* oklch */ color: oklch(33.5% 0.165 282.1);
Tailwind
colors: {
  custom: {
    50: '#755bab',
    500: '#311b87',
    950: '#000000',
  },
}
SCSS
$custom: #311b87;
$custom-light: #755bab;
$custom-dark: #000000;
JSON
{
  "hex": "#311b87",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 135
  },
  "hsl": {
    "h": 252.222,
    "s": 66.667,
    "l": 31.765
  },
  "oklch": {
    "l": 0.3353,
    "c": 0.16544,
    "h": 282.1
  },
  "luminance": 0.03186
}

Semantic roles & 50–950 ramp

primary
#311B87
secondary
#A2BA44
accent
#EA3EC7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311B87

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

Preview Lab → · Contrast checker → · Palette generator →

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