#31188E#31188E

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

Color values

HEX#31188E
RGBrgb(49, 24, 142)
HSLhsl(253, 71%, 33%)
HSVhsv(253, 83%, 56%)
CMYKcmyk(65.5%, 83.1%, 0%, 44.3%)
CIE-LABlab(21.05, 44.49, -60.00)
CIE-LCHlch(21.05, 74.69, 306.56°)
OKLaboklab(33.95% 0.0342 -0.1731)
OKLCHoklch(33.95% 0.176 281.2)
XYZxyz(6.4742, 3.2587, 25.8738)
Luminance0.0326 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31188E #758E18
analogous
#183A8E #31188E #6C188E
triadic
#31188E #8E3118 #188E31
tetradic
#31188E #8E183A #758E18 #188E6C
square
#31188E #8E183A #758E18 #188E6C
split-complementary
#31188E #8E6C18 #3A8E18
monochromatic
#0D0625 #1F0F5A #31188E #4321C2 #6341DF

Accessibility & contrast

On white

12.71
#31188E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#31188E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31188E
12.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31188E#FFFFFF#000000##FFFFFF
##31188E1.0012.711.6512.71
#FFFFFF12.711.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.711.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31188e;
/* rgb */ color: rgb(49, 24, 142);
/* oklch */ color: oklch(34.0% 0.176 281.2);
Tailwind
colors: {
  custom: {
    50: '#775ab0',
    500: '#31188e',
    950: '#000000',
  },
}
SCSS
$custom: #31188e;
$custom-light: #775ab0;
$custom-dark: #000000;
JSON
{
  "hex": "#31188e",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 142
  },
  "hsl": {
    "h": 252.712,
    "s": 71.084,
    "l": 32.549
  },
  "oklch": {
    "l": 0.33954,
    "c": 0.17649,
    "h": 281.2
  },
  "luminance": 0.03259
}

Semantic roles & 50–950 ramp

primary
#31188E
secondary
#A5C042
accent
#EE3AC8
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #31188E

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

Preview Lab → · Contrast checker → · Palette generator →

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