#311788#311788

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

Color values

HEX#311788
RGBrgb(49, 23, 136)
HSLhsl(254, 71%, 31%)
HSVhsv(254, 83%, 53%)
CMYKcmyk(64%, 83.1%, 0%, 46.7%)
CIE-LABlab(20.21, 43.16, -57.63)
CIE-LCHlch(20.21, 72.00, 306.83°)
OKLaboklab(33.17% 0.0368 -0.1662)
OKLCHoklch(33.17% 0.17 282.5)
XYZxyz(6.0156, 3.0429, 23.5581)
Luminance0.0304 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311788 #6E8817
analogous
#173588 #311788 #691788
triadic
#311788 #883117 #178831
tetradic
#311788 #881735 #6E8817 #178869
square
#311788 #881735 #6E8817 #178869
split-complementary
#311788 #886917 #358817
monochromatic
#0B051F #1E0E54 #311788 #4420BC #613BDE

Accessibility & contrast

On white

13.05
#311788 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311788
13.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311788#FFFFFF#000000##FFFFFF
##3117881.0013.051.6113.05
#FFFFFF13.051.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.051.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #311788;
/* rgb */ color: rgb(49, 23, 136);
/* oklch */ color: oklch(33.2% 0.170 282.5);
Tailwind
colors: {
  custom: {
    50: '#7659ac',
    500: '#311788',
    950: '#000000',
  },
}
SCSS
$custom: #311788;
$custom-light: #7659ac;
$custom-dark: #000000;
JSON
{
  "hex": "#311788",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 136
  },
  "hsl": {
    "h": 253.805,
    "s": 71.069,
    "l": 31.176
  },
  "oklch": {
    "l": 0.33175,
    "c": 0.17024,
    "h": 282.5
  },
  "luminance": 0.03043
}

Semantic roles & 50–950 ramp

primary
#311788
secondary
#9FBC3F
accent
#EE3AC4
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311788

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

Preview Lab → · Contrast checker → · Palette generator →

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