#311D8E#311D8E

#311D8E is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.5% C 0.172 H 280.5°. Best body text is #FFFFFF at 12.37:1 contrast (WCAG AA passes).

Color values

HEX#311D8E
RGBrgb(49, 29, 142)
HSLhsl(251, 66%, 34%)
HSVhsv(251, 80%, 56%)
CMYKcmyk(65.5%, 79.6%, 0%, 44.3%)
CIE-LABlab(21.89, 42.07, -58.62)
CIE-LCHlch(21.89, 72.15, 305.67°)
OKLaboklab(34.53% 0.0314 -0.1692)
OKLCHoklch(34.53% 0.172 280.5)
XYZxyz(6.5869, 3.4842, 25.9113)
Luminance0.0348 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D8E #7A8E1D
analogous
#1D428E #311D8E #691D8E
triadic
#311D8E #8E311D #1D8E31
tetradic
#311D8E #8E1D42 #7A8E1D #1D8E69
square
#311D8E #8E1D42 #7A8E1D #1D8E69
split-complementary
#311D8E #8E691D #428E1D
monochromatic
#0E0828 #1F135B #311D8E #4327C1 #644BDA

Accessibility & contrast

On white

12.37
#311D8E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#311D8E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D8E
12.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D8E#FFFFFF#000000##FFFFFF
##311D8E1.0012.371.7012.37
#FFFFFF12.371.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003891
Deuteranopia (green-blind)
#00308C
Tritanopia (blue-blind)
#003F55
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311d8e;
/* rgb */ color: rgb(49, 29, 142);
/* oklch */ color: oklch(34.5% 0.172 280.5);
Tailwind
colors: {
  custom: {
    50: '#775cb0',
    500: '#311d8e',
    950: '#000000',
  },
}
SCSS
$custom: #311d8e;
$custom-light: #775cb0;
$custom-dark: #000000;
JSON
{
  "hex": "#311d8e",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 142
  },
  "hsl": {
    "h": 250.619,
    "s": 66.082,
    "l": 33.529
  },
  "oklch": {
    "l": 0.34534,
    "c": 0.17208,
    "h": 280.5
  },
  "luminance": 0.03485
}

Semantic roles & 50–950 ramp

primary
#311D8E
secondary
#A8BD4A
accent
#E93FCB
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #311D8E

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

Preview Lab → · Contrast checker → · Palette generator →

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