#31179F#31179F

#31179F is a dark, vivid violet. Relative luminance 0.038; OKLCH L 35.8% C 0.197 H 278.4°. Best body text is #FFFFFF at 11.97:1 contrast (WCAG AA passes).

Color values

HEX#31179F
RGBrgb(49, 23, 159)
HSLhsl(251, 75%, 36%)
HSVhsv(251, 86%, 62%)
CMYKcmyk(69.2%, 85.5%, 0%, 37.6%)
CIE-LABlab(22.89, 49.92, -67.44)
CIE-LCHlch(22.89, 83.90, 306.51°)
OKLaboklab(35.8% 0.0289 -0.1947)
OKLCHoklch(35.8% 0.197 278.4)
XYZxyz(7.8290, 3.7683, 33.1089)
Luminance0.0377 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31179F #859F17
analogous
#17419F #31179F #75179F
triadic
#31179F #9F3117 #179F31
tetradic
#31179F #9F1741 #859F17 #179F75
square
#31179F #9F1741 #859F17 #179F75
split-complementary
#31179F #9F7517 #419F17
monochromatic
#100834 #210F6A #31179F #411FD4 #694BE5

Accessibility & contrast

On white

11.97
#31179F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.75
#31179F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31179F
11.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31179F#FFFFFF#000000##FFFFFF
##31179F1.0011.971.7511.97
#FFFFFF11.971.0021.001.00
#0000001.7521.001.0021.00
##FFFFFF11.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003CA3
Deuteranopia (green-blind)
#00319D
Tritanopia (blue-blind)
#00435E
Achromatopsia (no color)
#373737

Design tokens & code

CSS
--color: #31179f;
/* rgb */ color: rgb(49, 23, 159);
/* oklch */ color: oklch(35.8% 0.197 278.4);
Tailwind
colors: {
  custom: {
    50: '#7b5bbd',
    500: '#31179f',
    950: '#000000',
  },
}
SCSS
$custom: #31179f;
$custom-light: #7b5bbd;
$custom-dark: #000000;
JSON
{
  "hex": "#31179f",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 159
  },
  "hsl": {
    "h": 251.471,
    "s": 74.725,
    "l": 35.686
  },
  "oklch": {
    "l": 0.35797,
    "c": 0.19688,
    "h": 278.4
  },
  "luminance": 0.03769
}

Semantic roles & 50–950 ramp

primary
#31179F
secondary
#AFC74B
accent
#F136CE
background
#F8F5FB
surface
#EFE9F7
border
#CAC5D0
text
#0B0412
muted
#7C7981

Preview Lab

Preview with #31179F

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

Preview Lab → · Contrast checker → · Palette generator →

#31179F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva