#311F8A#311F8A

#311F8A is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.4% C 0.165 H 280.9°. Best body text is #FFFFFF at 12.40:1 contrast (WCAG AA passes).

Color values

HEX#311F8A
RGBrgb(49, 31, 138)
HSLhsl(250, 63%, 33%)
HSVhsv(250, 78%, 54%)
CMYKcmyk(64.5%, 77.5%, 0%, 45.9%)
CIE-LABlab(21.83, 39.76, -56.22)
CIE-LCHlch(21.83, 68.86, 305.27°)
OKLaboklab(34.36% 0.0313 -0.1622)
OKLCHoklch(34.36% 0.165 280.9)
XYZxyz(6.3426, 3.4674, 24.3749)
Luminance0.0347 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F8A #788A1F
analogous
#1F438A #311F8A #661F8A
triadic
#311F8A #8A311F #1F8A31
tetradic
#311F8A #8A1F43 #788A1F #1F8A66
square
#311F8A #8A1F43 #788A1F #1F8A66
split-complementary
#311F8A #8A661F #438A1F
monochromatic
#0E0926 #1F1458 #311F8A #432ABC #644CD7

Accessibility & contrast

On white

12.40
#311F8A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #311F8A
12.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F8A#FFFFFF#000000##FFFFFF
##311F8A1.0012.401.6912.40
#FFFFFF12.401.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00388D
Deuteranopia (green-blind)
#003088
Tritanopia (blue-blind)
#003E53
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #311f8a;
/* rgb */ color: rgb(49, 31, 138);
/* oklch */ color: oklch(34.4% 0.165 280.9);
Tailwind
colors: {
  custom: {
    50: '#765dad',
    500: '#311f8a',
    950: '#000000',
  },
}
SCSS
$custom: #311f8a;
$custom-light: #765dad;
$custom-dark: #000000;
JSON
{
  "hex": "#311f8a",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 138
  },
  "hsl": {
    "h": 250.093,
    "s": 63.314,
    "l": 33.137
  },
  "oklch": {
    "l": 0.34364,
    "c": 0.16521,
    "h": 280.9
  },
  "luminance": 0.03468
}

Semantic roles & 50–950 ramp

primary
#311F8A
secondary
#A7BA4B
accent
#E641CB
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311F8A

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

Preview Lab → · Contrast checker → · Palette generator →

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