#311B8E#311B8E

#311B8E is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.3% C 0.174 H 280.8°. Best body text is #FFFFFF at 12.51:1 contrast (WCAG AA passes).

Color values

HEX#311B8E
RGBrgb(49, 27, 142)
HSLhsl(251, 68%, 33%)
HSVhsv(251, 81%, 56%)
CMYKcmyk(65.5%, 81%, 0%, 44.3%)
CIE-LABlab(21.54, 43.07, -59.19)
CIE-LCHlch(21.54, 73.20, 306.04°)
OKLaboklab(34.29% 0.0326 -0.1708)
OKLCHoklch(34.29% 0.174 280.8)
XYZxyz(6.5395, 3.3893, 25.8955)
Luminance0.0339 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B8E #788E1B
analogous
#1B3F8E #311B8E #6A1B8E
triadic
#311B8E #8E311B #1B8E31
tetradic
#311B8E #8E1B3F #788E1B #1B8E6A
square
#311B8E #8E1B3F #788E1B #1B8E6A
split-complementary
#311B8E #8E6A1B #3F8E1B
monochromatic
#0E0727 #1F115B #311B8E #4325C1 #6447DC

Accessibility & contrast

On white

12.51
#311B8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#311B8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B8E
12.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B8E#FFFFFF#000000##FFFFFF
##311B8E1.0012.511.6812.51
#FFFFFF12.511.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003891
Deuteranopia (green-blind)
#002F8C
Tritanopia (blue-blind)
#003E55
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311b8e;
/* rgb */ color: rgb(49, 27, 142);
/* oklch */ color: oklch(34.3% 0.174 280.8);
Tailwind
colors: {
  custom: {
    50: '#775bb0',
    500: '#311b8e',
    950: '#000000',
  },
}
SCSS
$custom: #311b8e;
$custom-light: #775bb0;
$custom-dark: #000000;
JSON
{
  "hex": "#311b8e",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 142
  },
  "hsl": {
    "h": 251.478,
    "s": 68.047,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34293,
    "c": 0.17391,
    "h": 280.8
  },
  "luminance": 0.0339
}

Semantic roles & 50–950 ramp

primary
#311B8E
secondary
#A7BE47
accent
#EB3DCA
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311B8E

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

Preview Lab → · Contrast checker → · Palette generator →

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