#31159E#31159E

#31159E is a dark, vivid violet. Relative luminance 0.037; OKLCH L 35.5% C 0.197 H 278.7°. Best body text is #FFFFFF at 12.13:1 contrast (WCAG AA passes).

Color values

HEX#31159E
RGBrgb(49, 21, 158)
HSLhsl(252, 77%, 35%)
HSVhsv(252, 87%, 62%)
CMYKcmyk(69%, 86.7%, 0%, 38%)
CIE-LABlab(22.50, 50.42, -67.47)
CIE-LCHlch(22.50, 84.23, 306.77°)
OKLaboklab(35.5% 0.03 -0.1948)
OKLCHoklch(35.5% 0.197 278.7)
XYZxyz(7.7044, 3.6573, 32.6410)
Luminance0.0366 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31159E #829E15
analogous
#153D9E #31159E #76159E
triadic
#31159E #9E3115 #159E31
tetradic
#31159E #9E153D #829E15 #159E76
square
#31159E #9E153D #829E15 #159E76
split-complementary
#31159E #9E7615 #3D9E15
monochromatic
#0F0732 #200E68 #31159E #421CD4 #6847E7

Accessibility & contrast

On white

12.13
#31159E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.73
#31159E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31159E
12.13:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31159E#FFFFFF#000000##FFFFFF
##31159E1.0012.131.7312.13
#FFFFFF12.131.0021.001.00
#0000001.7321.001.0021.00
##FFFFFF12.131.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003BA2
Deuteranopia (green-blind)
#00309C
Tritanopia (blue-blind)
#00425D
Achromatopsia (no color)
#363636

Design tokens & code

CSS
--color: #31159e;
/* rgb */ color: rgb(49, 21, 158);
/* oklch */ color: oklch(35.5% 0.197 278.7);
Tailwind
colors: {
  custom: {
    50: '#7b5abc',
    500: '#31159e',
    950: '#000000',
  },
}
SCSS
$custom: #31159e;
$custom-light: #7b5abc;
$custom-dark: #000000;
JSON
{
  "hex": "#31159e",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 158
  },
  "hsl": {
    "h": 252.263,
    "s": 76.536,
    "l": 35.098
  },
  "oklch": {
    "l": 0.35499,
    "c": 0.19709,
    "h": 278.7
  },
  "luminance": 0.03658
}

Semantic roles & 50–950 ramp

primary
#31159E
secondary
#ADC747
accent
#F335CC
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #31159E

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

Preview Lab → · Contrast checker → · Palette generator →

#31159E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva