#31176C#31176C

#31176C is a dark, vivid violet. Relative luminance 0.023; OKLCH L 30.2% C 0.136 H 289.6°. Best body text is #FFFFFF at 14.29:1 contrast (WCAG AA passes).

Color values

HEX#31176C
RGBrgb(49, 23, 108)
HSLhsl(258, 65%, 26%)
HSVhsv(258, 79%, 42%)
CMYKcmyk(54.6%, 78.7%, 0%, 57.6%)
CIE-LABlab(17.22, 34.69, -44.65)
CIE-LCHlch(17.22, 56.54, 307.84°)
OKLaboklab(30.19% 0.0457 -0.1283)
OKLCHoklch(30.19% 0.136 289.6)
XYZxyz(4.2790, 2.3483, 14.4122)
Luminance0.0235 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31176C #526C17
analogous
#17276C #31176C #5B176C
triadic
#31176C #6C3117 #176C31
tetradic
#31176C #6C1727 #526C17 #176C5B
square
#31176C #6C1727 #526C17 #176C5B
split-complementary
#31176C #6C5B17 #276C17
monochromatic
#0B0519 #1A0C3A #31176C #48229E #5F2CD1

Accessibility & contrast

On white

14.29
#31176C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31176C
14.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31176C#FFFFFF#000000##FFFFFF
##31176C1.0014.291.4714.29
#FFFFFF14.291.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002C6E
Deuteranopia (green-blind)
#00286A
Tritanopia (blue-blind)
#1B2E40
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #31176c;
/* rgb */ color: rgb(49, 23, 108);
/* oklch */ color: oklch(30.2% 0.136 289.6);
Tailwind
colors: {
  custom: {
    50: '#705797',
    500: '#31176c',
    950: '#000000',
  },
}
SCSS
$custom: #31176c;
$custom-light: #705797;
$custom-dark: #000000;
JSON
{
  "hex": "#31176c",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 108
  },
  "hsl": {
    "h": 258.353,
    "s": 64.885,
    "l": 25.686
  },
  "oklch": {
    "l": 0.30189,
    "c": 0.13621,
    "h": 289.6
  },
  "luminance": 0.02348
}

Semantic roles & 50–950 ramp

primary
#31176C
secondary
#83A23D
accent
#E840B4
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08030D
muted
#7B787E

Preview Lab

Preview with #31176C

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

Preview Lab → · Contrast checker → · Palette generator →

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