#311D8F#311D8F

#311D8F is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.6% C 0.173 H 280.4°. Best body text is #FFFFFF at 12.33:1 contrast (WCAG AA passes).

Color values

HEX#311D8F
RGBrgb(49, 29, 143)
HSLhsl(251, 66%, 34%)
HSVhsv(251, 80%, 56%)
CMYKcmyk(65.7%, 79.7%, 0%, 43.9%)
CIE-LABlab(22.00, 42.38, -59.06)
CIE-LCHlch(22.00, 72.69, 305.66°)
OKLaboklab(34.64% 0.0312 -0.1705)
OKLCHoklch(34.64% 0.173 280.4)
XYZxyz(6.6623, 3.5143, 26.3085)
Luminance0.0352 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D8F #7B8F1D
analogous
#1D428F #311D8F #6A1D8F
triadic
#311D8F #8F311D #1D8F31
tetradic
#311D8F #8F1D42 #7B8F1D #1D8F6A
square
#311D8F #8F1D42 #7B8F1D #1D8F6A
split-complementary
#311D8F #8F6A1D #428F1D
monochromatic
#0E0829 #20135C #311D8F #4227C2 #654CDB

Accessibility & contrast

On white

12.33
#311D8F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311D8F
12.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D8F#FFFFFF#000000##FFFFFF
##311D8F1.0012.331.7012.33
#FFFFFF12.331.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003992
Deuteranopia (green-blind)
#00308D
Tritanopia (blue-blind)
#003F56
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #311d8f;
/* rgb */ color: rgb(49, 29, 143);
/* oklch */ color: oklch(34.6% 0.173 280.4);
Tailwind
colors: {
  custom: {
    50: '#775db1',
    500: '#311d8f',
    950: '#000000',
  },
}
SCSS
$custom: #311d8f;
$custom-light: #775db1;
$custom-dark: #000000;
JSON
{
  "hex": "#311d8f",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 143
  },
  "hsl": {
    "h": 250.526,
    "s": 66.279,
    "l": 33.725
  },
  "oklch": {
    "l": 0.34643,
    "c": 0.17329,
    "h": 280.4
  },
  "luminance": 0.03515
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #311D8F

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

Preview Lab → · Contrast checker → · Palette generator →

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