#31167A#31167A

#31167A is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.5% C 0.154 H 285.8°. Best body text is #FFFFFF at 13.76:1 contrast (WCAG AA passes).

Color values

HEX#31167A
RGBrgb(49, 22, 122)
HSLhsl(256, 69%, 28%)
HSVhsv(256, 82%, 48%)
CMYKcmyk(59.8%, 82%, 0%, 52.2%)
CIE-LABlab(18.50, 39.44, -51.58)
CIE-LCHlch(18.50, 64.93, 307.40°)
OKLaboklab(31.53% 0.0421 -0.1486)
OKLCHoklch(31.53% 0.154 285.8)
XYZxyz(5.0653, 2.6316, 18.6496)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31167A #5F7A16
analogous
#162D7A #31167A #63167A
triadic
#31167A #7A3116 #167A31
tetradic
#31167A #7A162D #5F7A16 #167A63
square
#31167A #7A162D #5F7A16 #167A63
split-complementary
#31167A #7A6316 #2D7A16
monochromatic
#0A051A #1C0D46 #31167A #461FAE #5E31DA

Accessibility & contrast

On white

13.76
#31167A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31167A
13.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31167A#FFFFFF#000000##FFFFFF
##31167A1.0013.761.5313.76
#FFFFFF13.761.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00307D
Deuteranopia (green-blind)
#002A78
Tritanopia (blue-blind)
#0A3448
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31167a;
/* rgb */ color: rgb(49, 22, 122);
/* oklch */ color: oklch(31.5% 0.154 285.8);
Tailwind
colors: {
  custom: {
    50: '#7357a1',
    500: '#31167a',
    950: '#000000',
  },
}
SCSS
$custom: #31167a;
$custom-light: #7357a1;
$custom-dark: #000000;
JSON
{
  "hex": "#31167a",
  "rgb": {
    "r": 49,
    "g": 22,
    "b": 122
  },
  "hsl": {
    "h": 256.2,
    "s": 69.444,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31529,
    "c": 0.15443,
    "h": 285.8
  },
  "luminance": 0.02632
}

Semantic roles & 50–950 ramp

primary
#31167A
secondary
#90AF3D
accent
#EC3CBD
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31167A

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

Preview Lab → · Contrast checker → · Palette generator →

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