#31188A#31188A

#31188A is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.5% C 0.172 H 281.9°. Best body text is #FFFFFF at 12.90:1 contrast (WCAG AA passes).

Color values

HEX#31188A
RGBrgb(49, 24, 138)
HSLhsl(253, 70%, 32%)
HSVhsv(253, 83%, 54%)
CMYKcmyk(64.5%, 82.6%, 0%, 45.9%)
CIE-LABlab(20.60, 43.29, -58.25)
CIE-LCHlch(20.60, 72.57, 306.62°)
OKLaboklab(33.51% 0.0355 -0.168)
OKLCHoklch(33.51% 0.172 281.9)
XYZxyz(6.1793, 3.1408, 24.3204)
Luminance0.0314 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31188A #718A18
analogous
#18388A #31188A #6A188A
triadic
#31188A #8A3118 #188A31
tetradic
#31188A #8A1838 #718A18 #188A6A
square
#31188A #8A1838 #718A18 #188A6A
split-complementary
#31188A #8A6A18 #388A18
monochromatic
#0C0622 #1E0F56 #31188A #4421BE #623FDE

Accessibility & contrast

On white

12.90
#31188A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.63
#31188A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31188A
12.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31188A#FFFFFF#000000##FFFFFF
##31188A1.0012.901.6312.90
#FFFFFF12.901.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358D
Deuteranopia (green-blind)
#002E88
Tritanopia (blue-blind)
#003B52
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31188a;
/* rgb */ color: rgb(49, 24, 138);
/* oklch */ color: oklch(33.5% 0.172 281.9);
Tailwind
colors: {
  custom: {
    50: '#765aad',
    500: '#31188a',
    950: '#000000',
  },
}
SCSS
$custom: #31188a;
$custom-light: #765aad;
$custom-dark: #000000;
JSON
{
  "hex": "#31188a",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 138
  },
  "hsl": {
    "h": 253.158,
    "s": 70.37,
    "l": 31.765
  },
  "oklch": {
    "l": 0.33508,
    "c": 0.17176,
    "h": 281.9
  },
  "luminance": 0.03141
}

Semantic roles & 50–950 ramp

primary
#31188A
secondary
#A2BD40
accent
#ED3BC6
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #31188A

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

Preview Lab → · Contrast checker → · Palette generator →

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