#311B77#311B77

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

Color values

HEX#311B77
RGBrgb(49, 27, 119)
HSLhsl(254, 63%, 29%)
HSVhsv(254, 77%, 47%)
CMYKcmyk(58.8%, 77.3%, 0%, 53.3%)
CIE-LABlab(19.09, 35.93, -48.69)
CIE-LCHlch(19.09, 60.51, 306.42°)
OKLaboklab(31.85% 0.0393 -0.1402)
OKLCHoklch(31.85% 0.146 285.6)
XYZxyz(4.9873, 2.7685, 17.7208)
Luminance0.0277 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B77 #61771B
analogous
#1B3377 #311B77 #5F1B77
triadic
#311B77 #77311B #1B7731
tetradic
#311B77 #771B33 #61771B #1B775F
square
#311B77 #771B33 #61771B #1B775F
split-complementary
#311B77 #775F1B #33771B
monochromatic
#0A0619 #1C1045 #311B77 #4626A9 #5E3AD2

Accessibility & contrast

On white

13.52
#311B77 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#311B77 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B77
13.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B77#FFFFFF#000000##FFFFFF
##311B771.0013.521.5513.52
#FFFFFF13.521.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317A
Deuteranopia (green-blind)
#002C75
Tritanopia (blue-blind)
#0F3547
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #311b77;
/* rgb */ color: rgb(49, 27, 119);
/* oklch */ color: oklch(31.8% 0.146 285.6);
Tailwind
colors: {
  custom: {
    50: '#725a9f',
    500: '#311b77',
    950: '#000000',
  },
}
SCSS
$custom: #311b77;
$custom-light: #725a9f;
$custom-dark: #000000;
JSON
{
  "hex": "#311b77",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 119
  },
  "hsl": {
    "h": 254.348,
    "s": 63.014,
    "l": 28.627
  },
  "oklch": {
    "l": 0.31846,
    "c": 0.14557,
    "h": 285.6
  },
  "luminance": 0.02769
}

Semantic roles & 50–950 ramp

primary
#311B77
secondary
#92AB42
accent
#E642BF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040F
muted
#7B797E

Preview Lab

Preview with #311B77

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

Preview Lab → · Contrast checker → · Palette generator →

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