#31188B#31188B

#31188B is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.173 H 281.7°. Best body text is #FFFFFF at 12.85:1 contrast (WCAG AA passes).

Color values

HEX#31188B
RGBrgb(49, 24, 139)
HSLhsl(253, 71%, 32%)
HSVhsv(253, 83%, 55%)
CMYKcmyk(64.7%, 82.7%, 0%, 45.5%)
CIE-LABlab(20.71, 43.59, -58.69)
CIE-LCHlch(20.71, 73.11, 306.61°)
OKLaboklab(33.62% 0.0352 -0.1693)
OKLCHoklch(33.62% 0.173 281.7)
XYZxyz(6.2520, 3.1699, 24.7035)
Luminance0.0317 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31188B #728B18
analogous
#18398B #31188B #6A188B
triadic
#31188B #8B3118 #188B31
tetradic
#31188B #8B1839 #728B18 #188B6A
square
#31188B #8B1839 #728B18 #188B6A
split-complementary
#31188B #8B6A18 #398B18
monochromatic
#0C0623 #1F0F57 #31188B #4321BF #623FDE

Accessibility & contrast

On white

12.85
#31188B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31188B
12.85:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31188B#FFFFFF#000000##FFFFFF
##31188B1.0012.851.6312.85
#FFFFFF12.851.0021.001.00
#0000001.6321.001.0021.00
##FFFFFF12.851.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368E
Deuteranopia (green-blind)
#002E89
Tritanopia (blue-blind)
#003B52
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31188b;
/* rgb */ color: rgb(49, 24, 139);
/* oklch */ color: oklch(33.6% 0.173 281.7);
Tailwind
colors: {
  custom: {
    50: '#765aae',
    500: '#31188b',
    950: '#000000',
  },
}
SCSS
$custom: #31188b;
$custom-light: #765aae;
$custom-dark: #000000;
JSON
{
  "hex": "#31188b",
  "rgb": {
    "r": 49,
    "g": 24,
    "b": 139
  },
  "hsl": {
    "h": 253.043,
    "s": 70.552,
    "l": 31.961
  },
  "oklch": {
    "l": 0.33619,
    "c": 0.17294,
    "h": 281.7
  },
  "luminance": 0.0317
}

Semantic roles & 50–950 ramp

primary
#31188B
secondary
#A3BE40
accent
#ED3AC6
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #31188B

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

Preview Lab → · Contrast checker → · Palette generator →

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