#31174A#31174A

#31174A is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.1% C 0.092 H 304.4°. Best body text is #FFFFFF at 15.53:1 contrast (WCAG AA passes).

Color values

HEX#31174A
RGBrgb(49, 23, 74)
HSLhsl(271, 53%, 19%)
HSVhsv(271, 69%, 29%)
CMYKcmyk(33.8%, 68.9%, 0%, 71%)
CIE-LABlab(14.17, 24.52, -26.81)
CIE-LCHlch(14.17, 36.33, 312.44°)
OKLaboklab(27.07% 0.052 -0.0759)
OKLCHoklch(27.07% 0.092 304.4)
XYZxyz(2.8088, 1.7602, 6.6690)
Luminance0.0176 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31174A #304A17
analogous
#18174A #31174A #4A174A
triadic
#31174A #4A3117 #174A31
tetradic
#31174A #4A1817 #304A17 #174A4A
square
#31174A #4A1817 #304A17 #174A4A
split-complementary
#31174A #4A4A17 #174A18
monochromatic
#0F0717 #12081B #31174A #502679 #6F34A7

Accessibility & contrast

On white

15.53
#31174A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.35
#31174A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31174A
15.53:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31174A#FFFFFF#000000##FFFFFF
##31174A1.0015.531.3515.53
#FFFFFF15.531.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.531.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00234C
Deuteranopia (green-blind)
#0A2449
Tritanopia (blue-blind)
#2C222E
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #31174a;
/* rgb */ color: rgb(49, 23, 74);
/* oklch */ color: oklch(27.1% 0.092 304.4);
Tailwind
colors: {
  custom: {
    50: '#6b567d',
    500: '#31174a',
    950: '#000000',
  },
}
SCSS
$custom: #31174a;
$custom-light: #6b567d;
$custom-dark: #000000;
JSON
{
  "hex": "#31174a",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 74
  },
  "hsl": {
    "h": 270.588,
    "s": 52.577,
    "l": 19.02
  },
  "oklch": {
    "l": 0.2707,
    "c": 0.09202,
    "h": 304.4
  },
  "luminance": 0.0176
}

Semantic roles & 50–950 ramp

primary
#31174A
secondary
#5E813C
accent
#DC4C92
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#070309
muted
#7A787B

Preview Lab

Preview with #31174A

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

Preview Lab → · Contrast checker → · Palette generator →

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