#311786#311786

#311786 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.0% C 0.168 H 282.9°. Best body text is #FFFFFF at 13.15:1 contrast (WCAG AA passes).

Color values

HEX#311786
RGBrgb(49, 23, 134)
HSLhsl(254, 71%, 31%)
HSVhsv(254, 83%, 53%)
CMYKcmyk(63.4%, 82.8%, 0%, 47.5%)
CIE-LABlab(19.99, 42.56, -56.74)
CIE-LCHlch(19.99, 70.93, 306.87°)
OKLaboklab(32.95% 0.0374 -0.1636)
OKLCHoklch(32.95% 0.168 282.9)
XYZxyz(5.8748, 2.9866, 22.8165)
Luminance0.0299 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311786 #6C8617
analogous
#173486 #311786 #681786
triadic
#311786 #863117 #178631
tetradic
#311786 #861734 #6C8617 #178668
square
#311786 #861734 #6C8617 #178668
split-complementary
#311786 #866817 #348617
monochromatic
#0B051E #1E0E52 #311786 #4420BA #603ADD

Accessibility & contrast

On white

13.15
#311786 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#311786 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311786
13.15:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311786#FFFFFF#000000##FFFFFF
##3117861.0013.151.6013.15
#FFFFFF13.151.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.151.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003489
Deuteranopia (green-blind)
#002C84
Tritanopia (blue-blind)
#00394F
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #311786;
/* rgb */ color: rgb(49, 23, 134);
/* oklch */ color: oklch(33.0% 0.168 282.9);
Tailwind
colors: {
  custom: {
    50: '#7559aa',
    500: '#311786',
    950: '#000000',
  },
}
SCSS
$custom: #311786;
$custom-light: #7559aa;
$custom-dark: #000000;
JSON
{
  "hex": "#311786",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 134
  },
  "hsl": {
    "h": 254.054,
    "s": 70.701,
    "l": 30.784
  },
  "oklch": {
    "l": 0.32953,
    "c": 0.16787,
    "h": 282.9
  },
  "luminance": 0.02987
}

Semantic roles & 50–950 ramp

primary
#311786
secondary
#9DBA3F
accent
#ED3AC4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311786

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

Preview Lab → · Contrast checker → · Palette generator →

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