#311887#311887

#311887 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.2% C 0.168 H 282.5°. Best body text is #FFFFFF at 13.03:1 contrast (WCAG AA passes).

Color values

HEX#311887
RGBrgb(49, 24, 135)
HSLhsl(254, 70%, 31%)
HSVhsv(254, 82%, 53%)
CMYKcmyk(63.7%, 82.2%, 0%, 47.1%)
CIE-LABlab(20.26, 42.39, -56.92)
CIE-LCHlch(20.26, 70.97, 306.68°)
OKLaboklab(33.18% 0.0365 -0.1642)
OKLCHoklch(33.18% 0.168 282.5)
XYZxyz(5.9651, 3.0551, 23.1923)
Luminance0.0306 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311887 #6E8718
analogous
#183687 #311887 #681887
triadic
#311887 #873118 #188731
tetradic
#311887 #871836 #6E8718 #188768
square
#311887 #871836 #6E8718 #188768
split-complementary
#311887 #876818 #368718
monochromatic
#0B061F #1E0F53 #311887 #4421BB #613DDC

Accessibility & contrast

On white

13.03
#311887 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#311887 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311887
13.03:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311887#FFFFFF#000000##FFFFFF
##3118871.0013.031.6113.03
#FFFFFF13.031.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.031.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00348A
Deuteranopia (green-blind)
#002D85
Tritanopia (blue-blind)
#003A50
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311887;
/* rgb */ color: rgb(49, 24, 135);
/* oklch */ color: oklch(33.2% 0.168 282.5);
Tailwind
colors: {
  custom: {
    50: '#7659ab',
    500: '#311887',
    950: '#000000',
  },
}
SCSS
$custom: #311887;
$custom-light: #7659ab;
$custom-dark: #000000;
JSON
{
  "hex": "#311887",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 135
  },
  "hsl": {
    "h": 253.514,
    "s": 69.811,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33176,
    "c": 0.16819,
    "h": 282.5
  },
  "luminance": 0.03056
}

Semantic roles & 50–950 ramp

primary
#311887
secondary
#9FBB40
accent
#ED3BC5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311887

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

Preview Lab → · Contrast checker → · Palette generator →

#311887 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva