#311C82#311C82

#311C82 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.1% C 0.158 H 283.0°. Best body text is #FFFFFF at 12.97:1 contrast (WCAG AA passes).

Color values

HEX#311C82
RGBrgb(49, 28, 130)
HSLhsl(252, 65%, 31%)
HSVhsv(252, 78%, 51%)
CMYKcmyk(62.3%, 78.5%, 0%, 49%)
CIE-LABlab(20.42, 38.84, -53.51)
CIE-LCHlch(20.42, 66.12, 305.98°)
OKLaboklab(33.12% 0.0355 -0.1543)
OKLCHoklch(33.12% 0.158 283)
XYZxyz(5.7099, 3.0948, 21.4112)
Luminance0.0309 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C82 #6D821C
analogous
#1C3A82 #311C82 #641C82
triadic
#311C82 #82311C #1C8231
tetradic
#311C82 #821C3A #6D821C #1C8264
square
#311C82 #821C3A #6D821C #1C8264
split-complementary
#311C82 #82641C #3A821C
monochromatic
#0B061D #1E1150 #311C82 #4427B4 #6142D6

Accessibility & contrast

On white

12.97
#311C82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.62
#311C82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C82
12.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C82#FFFFFF#000000##FFFFFF
##311C821.0012.971.6212.97
#FFFFFF12.971.0021.001.00
#0000001.6221.001.0021.00
##FFFFFF12.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003485
Deuteranopia (green-blind)
#002E80
Tritanopia (blue-blind)
#00394E
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311c82;
/* rgb */ color: rgb(49, 28, 130);
/* oklch */ color: oklch(33.1% 0.158 283.0);
Tailwind
colors: {
  custom: {
    50: '#745ba7',
    500: '#311c82',
    950: '#000000',
  },
}
SCSS
$custom: #311c82;
$custom-light: #745ba7;
$custom-dark: #000000;
JSON
{
  "hex": "#311c82",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 130
  },
  "hsl": {
    "h": 252.353,
    "s": 64.557,
    "l": 30.98
  },
  "oklch": {
    "l": 0.33123,
    "c": 0.15831,
    "h": 283
  },
  "luminance": 0.03095
}

Semantic roles & 50–950 ramp

primary
#311C82
secondary
#9EB544
accent
#E840C5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311C82

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

Preview Lab → · Contrast checker → · Palette generator →

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