#311988#311988

#311988 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.4% C 0.169 H 282.2°. Best body text is #FFFFFF at 12.92:1 contrast (WCAG AA passes).

Color values

HEX#311988
RGBrgb(49, 25, 136)
HSLhsl(253, 69%, 32%)
HSVhsv(253, 82%, 53%)
CMYKcmyk(64%, 81.6%, 0%, 46.7%)
CIE-LABlab(20.54, 42.22, -57.09)
CIE-LCHlch(20.54, 71.00, 306.48°)
OKLaboklab(33.4% 0.0356 -0.1647)
OKLCHoklch(33.4% 0.169 282.2)
XYZxyz(6.0568, 3.1254, 23.5719)
Luminance0.0313 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311988 #708819
analogous
#193988 #311988 #691988
triadic
#311988 #883119 #198831
tetradic
#311988 #881939 #708819 #198869
square
#311988 #881939 #708819 #198869
split-complementary
#311988 #886919 #398819
monochromatic
#0C0621 #1E0F54 #311988 #4423BC #6140DC

Accessibility & contrast

On white

12.92
#311988 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#311988 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311988
12.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311988#FFFFFF#000000##FFFFFF
##3119881.0012.921.6312.92
#FFFFFF12.921.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358B
Deuteranopia (green-blind)
#002E86
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311988;
/* rgb */ color: rgb(49, 25, 136);
/* oklch */ color: oklch(33.4% 0.169 282.2);
Tailwind
colors: {
  custom: {
    50: '#765aac',
    500: '#311988',
    950: '#000000',
  },
}
SCSS
$custom: #311988;
$custom-light: #765aac;
$custom-dark: #000000;
JSON
{
  "hex": "#311988",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 136
  },
  "hsl": {
    "h": 252.973,
    "s": 68.944,
    "l": 31.569
  },
  "oklch": {
    "l": 0.334,
    "c": 0.1685,
    "h": 282.2
  },
  "luminance": 0.03126
}

Semantic roles & 50–950 ramp

primary
#311988
secondary
#A1BB41
accent
#EC3CC6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311988

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

Preview Lab → · Contrast checker → · Palette generator →

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