#311F87#311F87

#311F87 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.0% C 0.161 H 281.5°. Best body text is #FFFFFF at 12.53:1 contrast (WCAG AA passes).

Color values

HEX#311F87
RGBrgb(49, 31, 135)
HSLhsl(250, 63%, 33%)
HSVhsv(250, 77%, 53%)
CMYKcmyk(63.7%, 77%, 0%, 47.1%)
CIE-LABlab(21.51, 38.81, -54.86)
CIE-LCHlch(21.51, 67.20, 305.27°)
OKLaboklab(34.05% 0.0321 -0.1582)
OKLCHoklch(34.05% 0.161 281.5)
XYZxyz(6.1284, 3.3818, 23.2468)
Luminance0.0338 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F87 #75871F
analogous
#1F4187 #311F87 #651F87
triadic
#311F87 #87311F #1F8731
tetradic
#311F87 #871F41 #75871F #1F8765
square
#311F87 #871F41 #75871F #1F8765
split-complementary
#311F87 #87651F #41871F
monochromatic
#0D0823 #1F1455 #311F87 #432AB9 #634BD6

Accessibility & contrast

On white

12.53
#311F87 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311F87
12.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F87#FFFFFF#000000##FFFFFF
##311F871.0012.531.6812.53
#FFFFFF12.531.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378A
Deuteranopia (green-blind)
#003085
Tritanopia (blue-blind)
#003D51
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311f87;
/* rgb */ color: rgb(49, 31, 135);
/* oklch */ color: oklch(34.0% 0.161 281.5);
Tailwind
colors: {
  custom: {
    50: '#755dab',
    500: '#311f87',
    950: '#000000',
  },
}
SCSS
$custom: #311f87;
$custom-light: #755dab;
$custom-dark: #000000;
JSON
{
  "hex": "#311f87",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 135
  },
  "hsl": {
    "h": 250.385,
    "s": 62.651,
    "l": 32.549
  },
  "oklch": {
    "l": 0.34048,
    "c": 0.16146,
    "h": 281.5
  },
  "luminance": 0.03382
}

Semantic roles & 50–950 ramp

primary
#311F87
secondary
#A5B84A
accent
#E642C9
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311F87

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

Preview Lab → · Contrast checker → · Palette generator →

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