#311B88#311B88

#311B88 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.167 H 281.9°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#311B88
RGBrgb(49, 27, 136)
HSLhsl(252, 67%, 32%)
HSVhsv(252, 80%, 53%)
CMYKcmyk(64%, 80.1%, 0%, 46.7%)
CIE-LABlab(20.88, 41.23, -56.53)
CIE-LCHlch(20.88, 69.96, 306.10°)
OKLaboklab(33.64% 0.0344 -0.1631)
OKLCHoklch(33.64% 0.167 281.9)
XYZxyz(6.1011, 3.2140, 23.5866)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B88 #72881B
analogous
#1B3C88 #311B88 #681B88
triadic
#311B88 #88311B #1B8831
tetradic
#311B88 #881B3C #72881B #1B8868
square
#311B88 #881B3C #72881B #1B8868
split-complementary
#311B88 #88681B #3C881B
monochromatic
#0C0722 #1F1155 #311B88 #4325BB #6244DA

Accessibility & contrast

On white

12.78
#311B88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311B88
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B88#FFFFFF#000000##FFFFFF
##311B881.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368B
Deuteranopia (green-blind)
#002E86
Tritanopia (blue-blind)
#003B51
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311b88;
/* rgb */ color: rgb(49, 27, 136);
/* oklch */ color: oklch(33.6% 0.167 281.9);
Tailwind
colors: {
  custom: {
    50: '#755bac',
    500: '#311b88',
    950: '#000000',
  },
}
SCSS
$custom: #311b88;
$custom-light: #755bac;
$custom-dark: #000000;
JSON
{
  "hex": "#311b88",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 136
  },
  "hsl": {
    "h": 252.11,
    "s": 66.871,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33638,
    "c": 0.16666,
    "h": 281.9
  },
  "luminance": 0.03214
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #311B88

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

Preview Lab → · Contrast checker → · Palette generator →

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