#31167B#31167B

#31167B is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.6% C 0.156 H 285.6°. Best body text is #FFFFFF at 13.71:1 contrast (WCAG AA passes).

Color values

HEX#31167B
RGBrgb(49, 22, 123)
HSLhsl(256, 70%, 28%)
HSVhsv(256, 82%, 48%)
CMYKcmyk(60.2%, 82.1%, 0%, 51.8%)
CIE-LABlab(18.61, 39.74, -52.04)
CIE-LCHlch(18.61, 65.48, 307.36°)
OKLaboklab(31.64% 0.0418 -0.1499)
OKLCHoklch(31.64% 0.156 285.6)
XYZxyz(5.1276, 2.6565, 18.9776)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31167B #607B16
analogous
#162D7B #31167B #63167B
triadic
#31167B #7B3116 #167B31
tetradic
#31167B #7B162D #607B16 #167B63
square
#31167B #7B162D #607B16 #167B63
split-complementary
#31167B #7B6316 #2D7B16
monochromatic
#0A051A #1C0D47 #31167B #461FAF #5E31DA

Accessibility & contrast

On white

13.71
#31167B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#31167B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31167B
13.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31167B#FFFFFF#000000##FFFFFF
##31167B1.0013.711.5313.71
#FFFFFF13.711.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307E
Deuteranopia (green-blind)
#002A79
Tritanopia (blue-blind)
#083449
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31167b;
/* rgb */ color: rgb(49, 22, 123);
/* oklch */ color: oklch(31.6% 0.156 285.6);
Tailwind
colors: {
  custom: {
    50: '#7357a2',
    500: '#31167b',
    950: '#000000',
  },
}
SCSS
$custom: #31167b;
$custom-light: #7357a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31167b",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 123
  },
  "hsl": {
    "h": 256.04,
    "s": 69.655,
    "l": 28.431
  },
  "oklch": {
    "l": 0.31637,
    "c": 0.15563,
    "h": 285.6
  },
  "luminance": 0.02657
}

Semantic roles & 50–950 ramp

primary
#31167B
secondary
#91B03D
accent
#EC3BBD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31167B

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

Preview Lab → · Contrast checker → · Palette generator →

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