#311C78#311C78

#311C78 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.1% C 0.146 H 285.2°. Best body text is #FFFFFF at 13.39:1 contrast (WCAG AA passes).

Color values

HEX#311C78
RGBrgb(49, 28, 120)
HSLhsl(254, 62%, 29%)
HSVhsv(254, 77%, 47%)
CMYKcmyk(59.2%, 76.7%, 0%, 52.9%)
CIE-LABlab(19.39, 35.70, -48.85)
CIE-LCHlch(19.39, 60.50, 306.16°)
OKLaboklab(32.09% 0.0382 -0.1406)
OKLCHoklch(32.09% 0.146 285.2)
XYZxyz(5.0710, 2.8392, 18.0465)
Luminance0.0284 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311C78 #63781C
analogous
#1C3578 #311C78 #5F1C78
triadic
#311C78 #78311C #1C7831
tetradic
#311C78 #781C35 #63781C #1C785F
square
#311C78 #781C35 #63781C #1C785F
split-complementary
#311C78 #785F1C #35781C
monochromatic
#0A0619 #1D1046 #311C78 #4528AA #5F3DD2

Accessibility & contrast

On white

13.39
#311C78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#311C78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311C78
13.39:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311C78#FFFFFF#000000##FFFFFF
##311C781.0013.391.5713.39
#FFFFFF13.391.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.391.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317B
Deuteranopia (green-blind)
#002C76
Tritanopia (blue-blind)
#0D3548
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311c78;
/* rgb */ color: rgb(49, 28, 120);
/* oklch */ color: oklch(32.1% 0.146 285.2);
Tailwind
colors: {
  custom: {
    50: '#725ba0',
    500: '#311c78',
    950: '#000000',
  },
}
SCSS
$custom: #311c78;
$custom-light: #725ba0;
$custom-dark: #000000;
JSON
{
  "hex": "#311c78",
  "rgb": {
    "r": 49,
    "g": 28,
    "b": 120
  },
  "hsl": {
    "h": 253.696,
    "s": 62.162,
    "l": 29.02
  },
  "oklch": {
    "l": 0.32086,
    "c": 0.14573,
    "h": 285.2
  },
  "luminance": 0.0284
}

Semantic roles & 50–950 ramp

primary
#311C78
secondary
#94AC44
accent
#E543C0
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #311C78

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

Preview Lab → · Contrast checker → · Palette generator →

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