#31168E#31168E

#31168E is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.178 H 281.4°. Best body text is #FFFFFF at 12.84:1 contrast (WCAG AA passes).

Color values

HEX#31168E
RGBrgb(49, 22, 142)
HSLhsl(254, 73%, 32%)
HSVhsv(254, 85%, 56%)
CMYKcmyk(65.5%, 84.5%, 0%, 44.3%)
CIE-LABlab(20.75, 45.38, -60.50)
CIE-LCHlch(20.75, 75.63, 306.88°)
OKLaboklab(33.75% 0.0352 -0.1746)
OKLCHoklch(33.75% 0.178 281.4)
XYZxyz(6.4345, 3.1793, 25.8605)
Luminance0.0318 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31168E #738E16
analogous
#16378E #31168E #6D168E
triadic
#31168E #8E3116 #168E31
tetradic
#31168E #8E1637 #738E16 #168E6D
square
#31168E #8E1637 #738E16 #168E6D
split-complementary
#31168E #8E6D16 #378E16
monochromatic
#0C0624 #1F0E59 #31168E #431EC3 #623DE1

Accessibility & contrast

On white

12.84
#31168E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31168E
12.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31168E#FFFFFF#000000##FFFFFF
##31168E1.0012.841.6412.84
#FFFFFF12.841.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.841.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: #31168e;
/* rgb */ color: rgb(49, 22, 142);
/* oklch */ color: oklch(33.7% 0.178 281.4);
Tailwind
colors: {
  custom: {
    50: '#7759b0',
    500: '#31168e',
    950: '#000000',
  },
}
SCSS
$custom: #31168e;
$custom-light: #7759b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31168e",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 142
  },
  "hsl": {
    "h": 253.5,
    "s": 73.171,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33745,
    "c": 0.17809,
    "h": 281.4
  },
  "luminance": 0.0318
}

Semantic roles & 50–950 ramp

primary
#31168E
secondary
#A4C13F
accent
#F038C6
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31168E

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

Preview Lab → · Contrast checker → · Palette generator →

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