#311F88#311F88

#311F88 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.2% C 0.163 H 281.3°. Best body text is #FFFFFF at 12.48:1 contrast (WCAG AA passes).

Color values

HEX#311F88
RGBrgb(49, 31, 136)
HSLhsl(250, 63%, 33%)
HSVhsv(250, 77%, 53%)
CMYKcmyk(64%, 77.2%, 0%, 46.7%)
CIE-LABlab(21.62, 39.12, -55.31)
CIE-LCHlch(21.62, 67.75, 305.27°)
OKLaboklab(34.15% 0.0318 -0.1596)
OKLCHoklch(34.15% 0.163 281.3)
XYZxyz(6.1991, 3.4101, 23.6193)
Luminance0.0341 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F88 #76881F
analogous
#1F4188 #311F88 #661F88
triadic
#311F88 #88311F #1F8831
tetradic
#311F88 #881F41 #76881F #1F8866
square
#311F88 #881F41 #76881F #1F8866
split-complementary
#311F88 #88661F #41881F
monochromatic
#0D0824 #1F1456 #311F88 #432ABA #634BD6

Accessibility & contrast

On white

12.48
#311F88 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311F88
12.48:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F88#FFFFFF#000000##FFFFFF
##311F881.0012.481.6812.48
#FFFFFF12.481.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.481.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00378B
Deuteranopia (green-blind)
#003086
Tritanopia (blue-blind)
#003D52
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311f88;
/* rgb */ color: rgb(49, 31, 136);
/* oklch */ color: oklch(34.2% 0.163 281.3);
Tailwind
colors: {
  custom: {
    50: '#755dac',
    500: '#311f88',
    950: '#000000',
  },
}
SCSS
$custom: #311f88;
$custom-light: #755dac;
$custom-dark: #000000;
JSON
{
  "hex": "#311f88",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 136
  },
  "hsl": {
    "h": 250.286,
    "s": 62.874,
    "l": 32.745
  },
  "oklch": {
    "l": 0.34153,
    "c": 0.16271,
    "h": 281.3
  },
  "luminance": 0.03411
}

Semantic roles & 50–950 ramp

primary
#311F88
secondary
#A6B94A
accent
#E642CA
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311F88

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

Preview Lab → · Contrast checker → · Palette generator →

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