#311C81#311C81

#311C81 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.0% C 0.157 H 283.2°. Best body text is #FFFFFF at 13.01:1 contrast (WCAG AA passes).

Color values

HEX#311C81
RGBrgb(49, 28, 129)
HSLhsl(252, 64%, 31%)
HSVhsv(252, 78%, 51%)
CMYKcmyk(62%, 78.3%, 0%, 49.4%)
CIE-LABlab(20.31, 38.53, -53.05)
CIE-LCHlch(20.31, 65.57, 305.99°)
OKLaboklab(33.02% 0.0358 -0.1529)
OKLCHoklch(33.02% 0.157 283.2)
XYZxyz(5.6431, 3.0681, 21.0595)
Luminance0.0307 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C81 #6C811C
analogous
#1C3981 #311C81 #631C81
triadic
#311C81 #81311C #1C8131
tetradic
#311C81 #811C39 #6C811C #1C8163
square
#311C81 #811C39 #6C811C #1C8163
split-complementary
#311C81 #81631C #39811C
monochromatic
#0B061C #1E114F #311C81 #4427B3 #6042D6

Accessibility & contrast

On white

13.01
#311C81 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#311C81 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C81
13.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C81#FFFFFF#000000##FFFFFF
##311C811.0013.011.6113.01
#FFFFFF13.011.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003484
Deuteranopia (green-blind)
#002E7F
Tritanopia (blue-blind)
#00394D
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311c81;
/* rgb */ color: rgb(49, 28, 129);
/* oklch */ color: oklch(33.0% 0.157 283.2);
Tailwind
colors: {
  custom: {
    50: '#745ba7',
    500: '#311c81',
    950: '#000000',
  },
}
SCSS
$custom: #311c81;
$custom-light: #745ba7;
$custom-dark: #000000;
JSON
{
  "hex": "#311c81",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 129
  },
  "hsl": {
    "h": 252.475,
    "s": 64.331,
    "l": 30.784
  },
  "oklch": {
    "l": 0.33018,
    "c": 0.15706,
    "h": 283.2
  },
  "luminance": 0.03068
}

Semantic roles & 50–950 ramp

primary
#311C81
secondary
#9DB444
accent
#E740C5
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311C81

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

Preview Lab → · Contrast checker → · Palette generator →

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