#31178C#31178C

#31178C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.175 H 281.7°. Best body text is #FFFFFF at 12.87:1 contrast (WCAG AA passes).

Color values

HEX#31178C
RGBrgb(49, 23, 140)
HSLhsl(253, 72%, 32%)
HSVhsv(253, 84%, 55%)
CMYKcmyk(65%, 83.6%, 0%, 45.1%)
CIE-LABlab(20.67, 44.35, -59.38)
CIE-LCHlch(20.67, 74.12, 306.76°)
OKLaboklab(33.62% 0.0354 -0.1713)
OKLCHoklch(33.62% 0.175 281.7)
XYZxyz(6.3052, 3.1587, 25.0833)
Luminance0.0316 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31178C #728C17
analogous
#17388C #31178C #6C178C
triadic
#31178C #8C3117 #178C31
tetradic
#31178C #8C1738 #728C17 #178C6C
square
#31178C #8C1738 #728C17 #178C6C
split-complementary
#31178C #8C6C17 #388C17
monochromatic
#0C0623 #1F0E57 #31178C #4320C1 #623EDF

Accessibility & contrast

On white

12.87
#31178C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#31178C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31178C
12.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31178C#FFFFFF#000000##FFFFFF
##31178C1.0012.871.6312.87
#FFFFFF12.871.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368F
Deuteranopia (green-blind)
#002E8A
Tritanopia (blue-blind)
#003B53
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31178c;
/* rgb */ color: rgb(49, 23, 140);
/* oklch */ color: oklch(33.6% 0.175 281.7);
Tailwind
colors: {
  custom: {
    50: '#7759af',
    500: '#31178c',
    950: '#000000',
  },
}
SCSS
$custom: #31178c;
$custom-light: #7759af;
$custom-dark: #000000;
JSON
{
  "hex": "#31178c",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 140
  },
  "hsl": {
    "h": 253.333,
    "s": 71.779,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33623,
    "c": 0.17495,
    "h": 281.7
  },
  "luminance": 0.03159
}

Semantic roles & 50–950 ramp

primary
#31178C
secondary
#A3BF3F
accent
#EF39C6
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #31178C

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

Preview Lab → · Contrast checker → · Palette generator →

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