#31178E#31178E

#31178E is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.8% C 0.177 H 281.3°. Best body text is #FFFFFF at 12.78:1 contrast (WCAG AA passes).

Color values

HEX#31178E
RGBrgb(49, 23, 142)
HSLhsl(253, 72%, 32%)
HSVhsv(253, 84%, 56%)
CMYKcmyk(65.5%, 83.8%, 0%, 44.3%)
CIE-LABlab(20.90, 44.94, -60.25)
CIE-LCHlch(20.90, 75.17, 306.72°)
OKLaboklab(33.85% 0.0347 -0.1739)
OKLCHoklch(33.85% 0.177 281.3)
XYZxyz(6.4540, 3.2183, 25.8670)
Luminance0.0322 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31178E #748E17
analogous
#17398E #31178E #6C178E
triadic
#31178E #8E3117 #178E31
tetradic
#31178E #8E1739 #748E17 #178E6C
square
#31178E #8E1739 #748E17 #178E6C
split-complementary
#31178E #8E6C17 #398E17
monochromatic
#0D0625 #1F0E59 #31178E #4320C3 #633FE0

Accessibility & contrast

On white

12.78
#31178E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#31178E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31178E
12.78:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31178E#FFFFFF#000000##FFFFFF
##31178E1.0012.781.6412.78
#FFFFFF12.781.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.781.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003691
Deuteranopia (green-blind)
#002E8C
Tritanopia (blue-blind)
#003C54
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31178e;
/* rgb */ color: rgb(49, 23, 142);
/* oklch */ color: oklch(33.8% 0.177 281.3);
Tailwind
colors: {
  custom: {
    50: '#7759b0',
    500: '#31178e',
    950: '#000000',
  },
}
SCSS
$custom: #31178e;
$custom-light: #7759b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31178e",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 142
  },
  "hsl": {
    "h": 253.109,
    "s": 72.121,
    "l": 32.353
  },
  "oklch": {
    "l": 0.33848,
    "c": 0.17729,
    "h": 281.3
  },
  "luminance": 0.03219
}

Semantic roles & 50–950 ramp

primary
#31178E
secondary
#A4C040
accent
#EF39C7
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31178E

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

Preview Lab → · Contrast checker → · Palette generator →

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