#31174B#31174B

#31174B is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.2% C 0.093 H 303.8°. Best body text is #FFFFFF at 15.50:1 contrast (WCAG AA passes).

Color values

HEX#31174B
RGBrgb(49, 23, 75)
HSLhsl(270, 53%, 19%)
HSVhsv(270, 69%, 29%)
CMYKcmyk(34.7%, 69.3%, 0%, 70.6%)
CIE-LABlab(14.25, 24.81, -27.38)
CIE-LCHlch(14.25, 36.94, 312.18°)
OKLaboklab(27.15% 0.0519 -0.0776)
OKLCHoklch(27.15% 0.093 303.8)
XYZxyz(2.8427, 1.7738, 6.8479)
Luminance0.0177 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31174B #314B17
analogous
#17174B #31174B #4B174B
triadic
#31174B #4B3117 #174B31
tetradic
#31174B #4B1717 #314B17 #174B4B
square
#31174B #4B1717 #314B17 #174B4B
split-complementary
#31174B #4B4B17 #174B17
monochromatic
#0F0717 #12091C #31174B #50257A #6E34A9

Accessibility & contrast

On white

15.50
#31174B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31174B
15.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31174B#FFFFFF#000000##FFFFFF
##31174B1.0015.501.3515.50
#FFFFFF15.501.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00244D
Deuteranopia (green-blind)
#09244A
Tritanopia (blue-blind)
#2C222E
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #31174b;
/* rgb */ color: rgb(49, 23, 75);
/* oklch */ color: oklch(27.2% 0.093 303.8);
Tailwind
colors: {
  custom: {
    50: '#6c567e',
    500: '#31174b',
    950: '#000000',
  },
}
SCSS
$custom: #31174b;
$custom-light: #6c567e;
$custom-dark: #000000;
JSON
{
  "hex": "#31174b",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 75
  },
  "hsl": {
    "h": 270,
    "s": 53.061,
    "l": 19.216
  },
  "oklch": {
    "l": 0.2715,
    "c": 0.09336,
    "h": 303.8
  },
  "luminance": 0.01774
}

Semantic roles & 50–950 ramp

primary
#31174B
secondary
#5F823C
accent
#DC4B94
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #31174B

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

Preview Lab → · Contrast checker → · Palette generator →

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