#311B7A#311B7A

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

Color values

HEX#311B7A
RGBrgb(49, 27, 122)
HSLhsl(254, 64%, 29%)
HSVhsv(254, 78%, 48%)
CMYKcmyk(59.8%, 77.9%, 0%, 52.2%)
CIE-LABlab(19.40, 36.87, -50.11)
CIE-LCHlch(19.40, 62.21, 306.35°)
OKLaboklab(32.15% 0.0385 -0.1443)
OKLCHoklch(32.15% 0.149 284.9)
XYZxyz(5.1703, 2.8417, 18.6846)
Luminance0.0284 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B7A #647A1B
analogous
#1B357A #311B7A #611B7A
triadic
#311B7A #7A311B #1B7A31
tetradic
#311B7A #7A1B35 #647A1B #1B7A61
square
#311B7A #7A1B35 #647A1B #1B7A61
split-complementary
#311B7A #7A611B #357A1B
monochromatic
#0A0619 #1D1048 #311B7A #4526AC #5F3CD4

Accessibility & contrast

On white

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

On black

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

Best text color

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

Contrast matrix

fg \ bg##311B7A#FFFFFF#000000##FFFFFF
##311B7A1.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)
#00327D
Deuteranopia (green-blind)
#002C78
Tritanopia (blue-blind)
#0A3649
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311b7a;
/* rgb */ color: rgb(49, 27, 122);
/* oklch */ color: oklch(32.2% 0.149 284.9);
Tailwind
colors: {
  custom: {
    50: '#735aa1',
    500: '#311b7a',
    950: '#000000',
  },
}
SCSS
$custom: #311b7a;
$custom-light: #735aa1;
$custom-dark: #000000;
JSON
{
  "hex": "#311b7a",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 122
  },
  "hsl": {
    "h": 253.895,
    "s": 63.758,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32154,
    "c": 0.14936,
    "h": 284.9
  },
  "luminance": 0.02842
}

Semantic roles & 50–950 ramp

primary
#311B7A
secondary
#95AE43
accent
#E741C0
background
#F7F5FA
surface
#EDE9F3
border
#C8C5CD
text
#09040F
muted
#7B797F

Preview Lab

Preview with #311B7A

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

Preview Lab → · Contrast checker → · Palette generator →

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