#311B78#311B78

#311B78 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.9% C 0.147 H 285.4°. Best body text is #FFFFFF at 13.47:1 contrast (WCAG AA passes).

Color values

HEX#311B78
RGBrgb(49, 27, 120)
HSLhsl(254, 63%, 29%)
HSVhsv(254, 78%, 47%)
CMYKcmyk(59.2%, 77.5%, 0%, 52.9%)
CIE-LABlab(19.19, 36.25, -49.17)
CIE-LCHlch(19.19, 61.08, 306.40°)
OKLaboklab(31.95% 0.039 -0.1416)
OKLCHoklch(31.95% 0.147 285.4)
XYZxyz(5.0477, 2.7926, 18.0387)
Luminance0.0279 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B78 #62781B
analogous
#1B3478 #311B78 #601B78
triadic
#311B78 #78311B #1B7831
tetradic
#311B78 #781B34 #62781B #1B7860
square
#311B78 #781B34 #62781B #1B7860
split-complementary
#311B78 #78601B #34781B
monochromatic
#0A0619 #1D1046 #311B78 #4526AA #5F3BD3

Accessibility & contrast

On white

13.47
#311B78 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.56
#311B78 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B78
13.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B78#FFFFFF#000000##FFFFFF
##311B781.0013.471.5613.47
#FFFFFF13.471.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.471.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: #311b78;
/* rgb */ color: rgb(49, 27, 120);
/* oklch */ color: oklch(31.9% 0.147 285.4);
Tailwind
colors: {
  custom: {
    50: '#725aa0',
    500: '#311b78',
    950: '#000000',
  },
}
SCSS
$custom: #311b78;
$custom-light: #725aa0;
$custom-dark: #000000;
JSON
{
  "hex": "#311b78",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 120
  },
  "hsl": {
    "h": 254.194,
    "s": 63.265,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31948,
    "c": 0.14684,
    "h": 285.4
  },
  "luminance": 0.02793
}

Semantic roles & 50–950 ramp

primary
#311B78
secondary
#93AC43
accent
#E641BF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #311B78

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

Preview Lab → · Contrast checker → · Palette generator →

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