#31157A#31157A

#31157A is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.4% C 0.155 H 286.0°. Best body text is #FFFFFF at 13.83:1 contrast (WCAG AA passes).

Color values

HEX#31157A
RGBrgb(49, 21, 122)
HSLhsl(257, 71%, 28%)
HSVhsv(257, 83%, 48%)
CMYKcmyk(59.8%, 82.8%, 0%, 52.2%)
CIE-LABlab(18.34, 39.91, -51.85)
CIE-LCHlch(18.34, 65.44, 307.59°)
OKLaboklab(31.42% 0.0428 -0.1494)
OKLCHoklch(31.42% 0.155 286)
XYZxyz(5.0466, 2.5941, 18.6434)
Luminance0.0259 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31157A #5E7A15
analogous
#152B7A #31157A #63157A
triadic
#31157A #7A3115 #157A31
tetradic
#31157A #7A152B #5E7A15 #157A63
square
#31157A #7A152B #5E7A15 #157A63
split-complementary
#31157A #7A6315 #2B7A15
monochromatic
#0A041A #1C0C46 #31157A #461EAE #5E2EDB

Accessibility & contrast

On white

13.83
#31157A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#31157A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31157A
13.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31157A#FFFFFF#000000##FFFFFF
##31157A1.0013.831.5213.83
#FFFFFF13.831.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F7D
Deuteranopia (green-blind)
#002A78
Tritanopia (blue-blind)
#0B3348
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #31157a;
/* rgb */ color: rgb(49, 21, 122);
/* oklch */ color: oklch(31.4% 0.155 286.0);
Tailwind
colors: {
  custom: {
    50: '#7357a2',
    500: '#31157a',
    950: '#000000',
  },
}
SCSS
$custom: #31157a;
$custom-light: #7357a2;
$custom-dark: #000000;
JSON
{
  "hex": "#31157a",
  "rgb": {
    "r": 49,
    "g": 21,
    "b": 122
  },
  "hsl": {
    "h": 256.634,
    "s": 70.629,
    "l": 28.039
  },
  "oklch": {
    "l": 0.31415,
    "c": 0.15536,
    "h": 286
  },
  "luminance": 0.02594
}

Semantic roles & 50–950 ramp

primary
#31157A
secondary
#8FAF3B
accent
#ED3ABC
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09030F
muted
#7B787F

Preview Lab

Preview with #31157A

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

Preview Lab → · Contrast checker → · Palette generator →

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