#31174F#31174F

#31174F is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.5% C 0.099 H 301.5°. Best body text is #FFFFFF at 15.37:1 contrast (WCAG AA passes).

Color values

HEX#31174F
RGBrgb(49, 23, 79)
HSLhsl(268, 55%, 20%)
HSVhsv(268, 71%, 31%)
CMYKcmyk(38%, 70.9%, 0%, 69%)
CIE-LABlab(14.57, 25.97, -29.61)
CIE-LCHlch(14.57, 39.38, 311.25°)
OKLaboklab(27.48% 0.0516 -0.0841)
OKLCHoklch(27.48% 0.099 301.5)
XYZxyz(2.9840, 1.8303, 7.5917)
Luminance0.0183 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31174F #354F17
analogous
#17194F #31174F #4D174F
triadic
#31174F #4F3117 #174F31
tetradic
#31174F #4F1719 #354F17 #174F4D
square
#31174F #4F1719 #354F17 #174F4D
split-complementary
#31174F #4F4D17 #194F17
monochromatic
#0F0718 #140920 #31174F #4E257E #6C33AE

Accessibility & contrast

On white

15.37
#31174F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.37
#31174F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31174F
15.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31174F#FFFFFF#000000##FFFFFF
##31174F1.0015.371.3715.37
#FFFFFF15.371.0021.001.00
#0000001.3721.001.0021.00
##FFFFFF15.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002451
Deuteranopia (green-blind)
#03254E
Tritanopia (blue-blind)
#2B2330
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #31174f;
/* rgb */ color: rgb(49, 23, 79);
/* oklch */ color: oklch(27.5% 0.099 301.5);
Tailwind
colors: {
  custom: {
    50: '#6c5681',
    500: '#31174f',
    950: '#000000',
  },
}
SCSS
$custom: #31174f;
$custom-light: #6c5681;
$custom-dark: #000000;
JSON
{
  "hex": "#31174f",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 79
  },
  "hsl": {
    "h": 267.857,
    "s": 54.902,
    "l": 20
  },
  "oklch": {
    "l": 0.27481,
    "c": 0.0987,
    "h": 301.5
  },
  "luminance": 0.0183
}

Semantic roles & 50–950 ramp

primary
#31174F
secondary
#64863C
accent
#DE4A99
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #31174F

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

Preview Lab → · Contrast checker → · Palette generator →

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