#31174E#31174E

#31174E is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.4% C 0.097 H 302.1°. Best body text is #FFFFFF at 15.40:1 contrast (WCAG AA passes).

Color values

HEX#31174E
RGBrgb(49, 23, 78)
HSLhsl(268, 54%, 20%)
HSVhsv(268, 71%, 31%)
CMYKcmyk(37.2%, 70.5%, 0%, 69.4%)
CIE-LABlab(14.49, 25.67, -29.06)
CIE-LCHlch(14.49, 38.77, 311.46°)
OKLaboklab(27.4% 0.0517 -0.0825)
OKLCHoklch(27.4% 0.097 302.1)
XYZxyz(2.9478, 1.8158, 7.4014)
Luminance0.0182 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31174E #344E17
analogous
#17184E #31174E #4D174E
triadic
#31174E #4E3117 #174E31
tetradic
#31174E #4E1718 #344E17 #174E4D
square
#31174E #4E1718 #344E17 #174E4D
split-complementary
#31174E #4E4D17 #184E17
monochromatic
#0F0718 #13091F #31174E #4F257D #6C33AD

Accessibility & contrast

On white

15.40
#31174E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#31174E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31174E
15.40:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31174E#FFFFFF#000000##FFFFFF
##31174E1.0015.401.3615.40
#FFFFFF15.401.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.401.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002450
Deuteranopia (green-blind)
#04244D
Tritanopia (blue-blind)
#2B2330
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #31174e;
/* rgb */ color: rgb(49, 23, 78);
/* oklch */ color: oklch(27.4% 0.097 302.1);
Tailwind
colors: {
  custom: {
    50: '#6c5680',
    500: '#31174e',
    950: '#000000',
  },
}
SCSS
$custom: #31174e;
$custom-light: #6c5680;
$custom-dark: #000000;
JSON
{
  "hex": "#31174e",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 78
  },
  "hsl": {
    "h": 268.364,
    "s": 54.455,
    "l": 19.804
  },
  "oklch": {
    "l": 0.27397,
    "c": 0.09737,
    "h": 302.1
  },
  "luminance": 0.01816
}

Semantic roles & 50–950 ramp

primary
#31174E
secondary
#62853C
accent
#DE4A98
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #31174E

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

Preview Lab → · Contrast checker → · Palette generator →

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