#31198E#31198E

#31198E is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.1% C 0.176 H 281.1°. Best body text is #FFFFFF at 12.65:1 contrast (WCAG AA passes).

Color values

HEX#31198E
RGBrgb(49, 25, 142)
HSLhsl(252, 70%, 33%)
HSVhsv(252, 82%, 56%)
CMYKcmyk(65.5%, 82.4%, 0%, 44.3%)
CIE-LABlab(21.21, 44.03, -59.73)
CIE-LCHlch(21.21, 74.21, 306.39°)
OKLaboklab(34.06% 0.0337 -0.1724)
OKLCHoklch(34.06% 0.176 281.1)
XYZxyz(6.4952, 3.3007, 25.8808)
Luminance0.0330 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31198E #768E19
analogous
#193B8E #31198E #6C198E
triadic
#31198E #8E3119 #198E31
tetradic
#31198E #8E193B #768E19 #198E6C
square
#31198E #8E193B #768E19 #198E6C
split-complementary
#31198E #8E6C19 #3B8E19
monochromatic
#0D0726 #1F105A #31198E #4322C2 #6343DE

Accessibility & contrast

On white

12.65
#31198E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.66
#31198E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31198E
12.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31198E#FFFFFF#000000##FFFFFF
##31198E1.0012.651.6612.65
#FFFFFF12.651.0021.001.00
#0000001.6621.001.0021.00
##FFFFFF12.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003791
Deuteranopia (green-blind)
#002F8C
Tritanopia (blue-blind)
#003D54
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #31198e;
/* rgb */ color: rgb(49, 25, 142);
/* oklch */ color: oklch(34.1% 0.176 281.1);
Tailwind
colors: {
  custom: {
    50: '#775ab0',
    500: '#31198e',
    950: '#000000',
  },
}
SCSS
$custom: #31198e;
$custom-light: #775ab0;
$custom-dark: #000000;
JSON
{
  "hex": "#31198e",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 142
  },
  "hsl": {
    "h": 252.308,
    "s": 70.06,
    "l": 32.745
  },
  "oklch": {
    "l": 0.34064,
    "c": 0.17565,
    "h": 281.1
  },
  "luminance": 0.03301
}

Semantic roles & 50–950 ramp

primary
#31198E
secondary
#A6BF44
accent
#ED3BC8
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31198E

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

Preview Lab → · Contrast checker → · Palette generator →

#31198E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva