#311B79#311B79

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

Color values

HEX#311B79
RGBrgb(49, 27, 121)
HSLhsl(254, 64%, 29%)
HSVhsv(254, 78%, 47%)
CMYKcmyk(59.5%, 77.7%, 0%, 52.5%)
CIE-LABlab(19.30, 36.56, -49.64)
CIE-LCHlch(19.30, 61.65, 306.37°)
OKLaboklab(32.05% 0.0387 -0.1429)
OKLCHoklch(32.05% 0.148 285.2)
XYZxyz(5.1087, 2.8170, 18.3600)
Luminance0.0282 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B79 #63791B
analogous
#1B3479 #311B79 #601B79
triadic
#311B79 #79311B #1B7931
tetradic
#311B79 #791B34 #63791B #1B7960
square
#311B79 #791B34 #63791B #1B7960
split-complementary
#311B79 #79601B #34791B
monochromatic
#0A0619 #1D1047 #311B79 #4526AB #5F3BD3

Accessibility & contrast

On white

13.43
#311B79 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311B79
13.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B79#FFFFFF#000000##FFFFFF
##311B791.0013.431.5613.43
#FFFFFF13.431.0021.001.00
#0000001.5621.001.0021.00
##FFFFFF13.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317C
Deuteranopia (green-blind)
#002C77
Tritanopia (blue-blind)
#0C3549
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311b79;
/* rgb */ color: rgb(49, 27, 121);
/* oklch */ color: oklch(32.1% 0.148 285.2);
Tailwind
colors: {
  custom: {
    50: '#725aa1',
    500: '#311b79',
    950: '#000000',
  },
}
SCSS
$custom: #311b79;
$custom-light: #725aa1;
$custom-dark: #000000;
JSON
{
  "hex": "#311b79",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 121
  },
  "hsl": {
    "h": 254.043,
    "s": 63.514,
    "l": 29.02
  },
  "oklch": {
    "l": 0.32051,
    "c": 0.1481,
    "h": 285.2
  },
  "luminance": 0.02817
}

Semantic roles & 50–950 ramp

primary
#311B79
secondary
#94AD43
accent
#E741C0
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311B79

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

Preview Lab → · Contrast checker → · Palette generator →

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