#311F84#311F84

#311F84 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.7% C 0.158 H 282.0°. Best body text is #FFFFFF at 12.65:1 contrast (WCAG AA passes).

Color values

HEX#311F84
RGBrgb(49, 31, 132)
HSLhsl(251, 62%, 32%)
HSVhsv(251, 77%, 52%)
CMYKcmyk(62.9%, 76.5%, 0%, 48.2%)
CIE-LABlab(21.20, 37.85, -53.48)
CIE-LCHlch(21.20, 65.52, 305.28°)
OKLaboklab(33.74% 0.0328 -0.1542)
OKLCHoklch(33.74% 0.158 282)
XYZxyz(5.9202, 3.2985, 22.1500)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F84 #72841F
analogous
#1F4084 #311F84 #641F84
triadic
#311F84 #84311F #1F8431
tetradic
#311F84 #841F40 #72841F #1F8464
square
#311F84 #841F40 #72841F #1F8464
split-complementary
#311F84 #84641F #40841F
monochromatic
#0C0821 #1F1352 #311F84 #432BB6 #6249D4

Accessibility & contrast

On white

12.65
#311F84 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#311F84 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F84
12.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F84#FFFFFF#000000##FFFFFF
##311F841.0012.651.6612.65
#FFFFFF12.651.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003687
Deuteranopia (green-blind)
#002F82
Tritanopia (blue-blind)
#003B50
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #311f84;
/* rgb */ color: rgb(49, 31, 132);
/* oklch */ color: oklch(33.7% 0.158 282.0);
Tailwind
colors: {
  custom: {
    50: '#745da9',
    500: '#311f84',
    950: '#000000',
  },
}
SCSS
$custom: #311f84;
$custom-light: #745da9;
$custom-dark: #000000;
JSON
{
  "hex": "#311f84",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 132
  },
  "hsl": {
    "h": 250.693,
    "s": 61.963,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33736,
    "c": 0.15768,
    "h": 282
  },
  "luminance": 0.03299
}

Semantic roles & 50–950 ramp

primary
#311F84
secondary
#A3B748
accent
#E543C8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311F84

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

Preview Lab → · Contrast checker → · Palette generator →

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