#31178D#31178D

#31178D is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.176 H 281.5°. Best body text is #FFFFFF at 12.82:1 contrast (WCAG AA passes).

Color values

HEX#31178D
RGBrgb(49, 23, 141)
HSLhsl(253, 72%, 32%)
HSVhsv(253, 84%, 55%)
CMYKcmyk(65.2%, 83.7%, 0%, 44.7%)
CIE-LABlab(20.78, 44.65, -59.82)
CIE-LCHlch(20.78, 74.64, 306.74°)
OKLaboklab(33.74% 0.0351 -0.1726)
OKLCHoklch(33.74% 0.176 281.5)
XYZxyz(6.3792, 3.1884, 25.4734)
Luminance0.0319 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31178D #738D17
analogous
#17388D #31178D #6C178D
triadic
#31178D #8D3117 #178D31
tetradic
#31178D #8D1738 #738D17 #178D6C
square
#31178D #8D1738 #738D17 #178D6C
split-complementary
#31178D #8D6C17 #388D17
monochromatic
#0C0624 #1F0E58 #31178D #4320C2 #623FE0

Accessibility & contrast

On white

12.82
#31178D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31178D
12.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31178D#FFFFFF#000000##FFFFFF
##31178D1.0012.821.6412.82
#FFFFFF12.821.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.821.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31178d;
/* rgb */ color: rgb(49, 23, 141);
/* oklch */ color: oklch(33.7% 0.176 281.5);
Tailwind
colors: {
  custom: {
    50: '#7759b0',
    500: '#31178d',
    950: '#000000',
  },
}
SCSS
$custom: #31178d;
$custom-light: #7759b0;
$custom-dark: #000000;
JSON
{
  "hex": "#31178d",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 141
  },
  "hsl": {
    "h": 253.22,
    "s": 71.951,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33735,
    "c": 0.17612,
    "h": 281.5
  },
  "luminance": 0.03189
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #31178D

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

Preview Lab → · Contrast checker → · Palette generator →

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