#31176B#31176B

#31176B is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.1% C 0.135 H 289.9°. Best body text is #FFFFFF at 14.33:1 contrast (WCAG AA passes).

Color values

HEX#31176B
RGBrgb(49, 23, 107)
HSLhsl(259, 65%, 25%)
HSVhsv(259, 79%, 42%)
CMYKcmyk(54.2%, 78.5%, 0%, 58%)
CIE-LABlab(17.12, 34.39, -44.17)
CIE-LCHlch(17.12, 55.97, 307.90°)
OKLaboklab(30.09% 0.0459 -0.1269)
OKLCHoklch(30.09% 0.135 289.9)
XYZxyz(4.2261, 2.3271, 14.1336)
Luminance0.0233 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31176B #516B17
analogous
#17276B #31176B #5B176B
triadic
#31176B #6B3117 #176B31
tetradic
#31176B #6B1727 #516B17 #176B5B
square
#31176B #6B1727 #516B17 #176B5B
split-complementary
#31176B #6B5B17 #276B17
monochromatic
#0C0519 #1A0C39 #31176B #48229D #5F2DD0

Accessibility & contrast

On white

14.33
#31176B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#31176B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31176B
14.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31176B#FFFFFF#000000##FFFFFF
##31176B1.0014.331.4714.33
#FFFFFF14.331.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6D
Deuteranopia (green-blind)
#002869
Tritanopia (blue-blind)
#1C2E40
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31176b;
/* rgb */ color: rgb(49, 23, 107);
/* oklch */ color: oklch(30.1% 0.135 289.9);
Tailwind
colors: {
  custom: {
    50: '#705796',
    500: '#31176b',
    950: '#000000',
  },
}
SCSS
$custom: #31176b;
$custom-light: #705796;
$custom-dark: #000000;
JSON
{
  "hex": "#31176b",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 107
  },
  "hsl": {
    "h": 258.571,
    "s": 64.615,
    "l": 25.49
  },
  "oklch": {
    "l": 0.30088,
    "c": 0.13496,
    "h": 289.9
  },
  "luminance": 0.02327
}

Semantic roles & 50–950 ramp

primary
#31176B
secondary
#82A13D
accent
#E840B4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31176B

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

Preview Lab → · Contrast checker → · Palette generator →

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