#31168D#31168D

#31168D is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.177 H 281.6°. Best body text is #FFFFFF at 12.88:1 contrast (WCAG AA passes).

Color values

HEX#31168D
RGBrgb(49, 22, 141)
HSLhsl(254, 73%, 32%)
HSVhsv(254, 84%, 55%)
CMYKcmyk(65.2%, 84.4%, 0%, 44.7%)
CIE-LABlab(20.63, 45.09, -60.07)
CIE-LCHlch(20.63, 75.11, 306.89°)
OKLaboklab(33.63% 0.0356 -0.1733)
OKLCHoklch(33.63% 0.177 281.6)
XYZxyz(6.3597, 3.1494, 25.4669)
Luminance0.0315 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31168D #728D16
analogous
#16378D #31168D #6C168D
triadic
#31168D #8D3116 #168D31
tetradic
#31168D #8D1637 #728D16 #168D6C
square
#31168D #8D1637 #728D16 #168D6C
split-complementary
#31168D #8D6C16 #378D16
monochromatic
#0C0523 #1F0E58 #31168D #431EC2 #623DE1

Accessibility & contrast

On white

12.88
#31168D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#31168D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31168D
12.88:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31168D#FFFFFF#000000##FFFFFF
##31168D1.0012.881.6312.88
#FFFFFF12.881.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.881.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003690
Deuteranopia (green-blind)
#002D8B
Tritanopia (blue-blind)
#003B53
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31168d;
/* rgb */ color: rgb(49, 22, 141);
/* oklch */ color: oklch(33.6% 0.177 281.6);
Tailwind
colors: {
  custom: {
    50: '#7759b0',
    500: '#31168d',
    950: '#000000',
  },
}
SCSS
$custom: #31168d;
$custom-light: #7759b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31168d",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 141
  },
  "hsl": {
    "h": 253.613,
    "s": 73.006,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33631,
    "c": 0.17692,
    "h": 281.6
  },
  "luminance": 0.0315
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #31168D

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

Preview Lab → · Contrast checker → · Palette generator →

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