#311F82#311F82

#311F82 is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.5% C 0.155 H 282.4°. Best body text is #FFFFFF at 12.73:1 contrast (WCAG AA passes).

Color values

HEX#311F82
RGBrgb(49, 31, 130)
HSLhsl(251, 61%, 32%)
HSVhsv(251, 76%, 51%)
CMYKcmyk(62.3%, 76.2%, 0%, 49%)
CIE-LABlab(21.00, 37.21, -52.56)
CIE-LCHlch(21.00, 64.40, 305.29°)
OKLaboklab(33.53% 0.0333 -0.1515)
OKLCHoklch(33.53% 0.155 282.4)
XYZxyz(5.7846, 3.2442, 21.4361)
Luminance0.0324 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F82 #70821F
analogous
#1F3F82 #311F82 #631F82
triadic
#311F82 #82311F #1F8231
tetradic
#311F82 #821F3F #70821F #1F8263
square
#311F82 #821F3F #70821F #1F8263
split-complementary
#311F82 #82631F #3F821F
monochromatic
#0C071F #1E1351 #311F82 #442BB3 #6148D3

Accessibility & contrast

On white

12.73
#311F82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#311F82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F82
12.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F82#FFFFFF#000000##FFFFFF
##311F821.0012.731.6512.73
#FFFFFF12.731.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003685
Deuteranopia (green-blind)
#002F80
Tritanopia (blue-blind)
#003B4F
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #311f82;
/* rgb */ color: rgb(49, 31, 130);
/* oklch */ color: oklch(33.5% 0.155 282.4);
Tailwind
colors: {
  custom: {
    50: '#745da7',
    500: '#311f82',
    950: '#000000',
  },
}
SCSS
$custom: #311f82;
$custom-light: #745da7;
$custom-dark: #000000;
JSON
{
  "hex": "#311f82",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 130
  },
  "hsl": {
    "h": 250.909,
    "s": 61.491,
    "l": 31.569
  },
  "oklch": {
    "l": 0.33529,
    "c": 0.15515,
    "h": 282.4
  },
  "luminance": 0.03245
}

Semantic roles & 50–950 ramp

primary
#311F82
secondary
#A1B548
accent
#E543C7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311F82

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

Preview Lab → · Contrast checker → · Palette generator →

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