#31198B#31198B

#31198B is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.7% C 0.172 H 281.6°. Best body text is #FFFFFF at 12.79:1 contrast (WCAG AA passes).

Color values

HEX#31198B
RGBrgb(49, 25, 139)
HSLhsl(253, 70%, 32%)
HSVhsv(253, 82%, 55%)
CMYKcmyk(64.7%, 82%, 0%, 45.5%)
CIE-LABlab(20.87, 43.13, -58.42)
CIE-LCHlch(20.87, 72.61, 306.44°)
OKLaboklab(33.73% 0.0347 -0.1686)
OKLCHoklch(33.73% 0.172 281.6)
XYZxyz(6.2730, 3.2118, 24.7105)
Luminance0.0321 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31198B #738B19
analogous
#193A8B #31198B #6A198B
triadic
#31198B #8B3119 #198B31
tetradic
#31198B #8B193A #738B19 #198B6A
square
#31198B #8B193A #738B19 #198B6A
split-complementary
#31198B #8B6A19 #3A8B19
monochromatic
#0C0623 #1F1057 #31198B #4322BF #6241DD

Accessibility & contrast

On white

12.79
#31198B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#31198B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31198B
12.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31198B#FFFFFF#000000##FFFFFF
##31198B1.0012.791.6412.79
#FFFFFF12.791.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.791.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31198b;
/* rgb */ color: rgb(49, 25, 139);
/* oklch */ color: oklch(33.7% 0.172 281.6);
Tailwind
colors: {
  custom: {
    50: '#765aae',
    500: '#31198b',
    950: '#000000',
  },
}
SCSS
$custom: #31198b;
$custom-light: #765aae;
$custom-dark: #000000;
JSON
{
  "hex": "#31198b",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 139
  },
  "hsl": {
    "h": 252.632,
    "s": 69.512,
    "l": 32.157
  },
  "oklch": {
    "l": 0.33731,
    "c": 0.17209,
    "h": 281.6
  },
  "luminance": 0.03212
}

Semantic roles & 50–950 ramp

primary
#31198B
secondary
#A4BE42
accent
#EC3BC7
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #31198B

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

Preview Lab → · Contrast checker → · Palette generator →

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