#311E8B#311E8B

#311E8B is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.3% C 0.167 H 280.9°. Best body text is #FFFFFF at 12.43:1 contrast (WCAG AA passes).

Color values

HEX#311E8B
RGBrgb(49, 30, 139)
HSLhsl(250, 64%, 33%)
HSVhsv(250, 78%, 55%)
CMYKcmyk(64.7%, 78.4%, 0%, 45.5%)
CIE-LABlab(21.74, 40.61, -56.98)
CIE-LCHlch(21.74, 69.97, 305.48°)
OKLaboklab(34.34% 0.0317 -0.1644)
OKLCHoklch(34.34% 0.167 280.9)
XYZxyz(6.3896, 3.4451, 24.7494)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311E8B #788B1E
analogous
#1E418B #311E8B #671E8B
triadic
#311E8B #8B311E #1E8B31
tetradic
#311E8B #8B1E41 #788B1E #1E8B67
square
#311E8B #8B1E41 #788B1E #1E8B67
split-complementary
#311E8B #8B671E #418B1E
monochromatic
#0E0826 #1F1359 #311E8B #4329BD #644BD8

Accessibility & contrast

On white

12.43
#311E8B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#311E8B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311E8B
12.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311E8B#FFFFFF#000000##FFFFFF
##311E8B1.0012.431.6912.43
#FFFFFF12.431.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388E
Deuteranopia (green-blind)
#003089
Tritanopia (blue-blind)
#003E54
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311e8b;
/* rgb */ color: rgb(49, 30, 139);
/* oklch */ color: oklch(34.3% 0.167 280.9);
Tailwind
colors: {
  custom: {
    50: '#765dae',
    500: '#311e8b',
    950: '#000000',
  },
}
SCSS
$custom: #311e8b;
$custom-light: #765dae;
$custom-dark: #000000;
JSON
{
  "hex": "#311e8b",
  "rgb": {
    "r": 49,
    "g": 30,
    "b": 139
  },
  "hsl": {
    "h": 250.459,
    "s": 64.497,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34338,
    "c": 0.16744,
    "h": 280.9
  },
  "luminance": 0.03446
}

Semantic roles & 50–950 ramp

primary
#311E8B
secondary
#A7BB4A
accent
#E740CA
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311E8B

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

Preview Lab → · Contrast checker → · Palette generator →

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