#31198C#31198C

#31198C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.8% C 0.173 H 281.4°. Best body text is #FFFFFF at 12.74:1 contrast (WCAG AA passes).

Color values

HEX#31198C
RGBrgb(49, 25, 140)
HSLhsl(253, 70%, 32%)
HSVhsv(253, 82%, 55%)
CMYKcmyk(65%, 82.1%, 0%, 45.1%)
CIE-LABlab(20.99, 43.43, -58.86)
CIE-LCHlch(20.99, 73.15, 306.42°)
OKLaboklab(33.84% 0.0343 -0.1698)
OKLCHoklch(33.84% 0.173 281.4)
XYZxyz(6.3464, 3.2412, 25.0970)
Luminance0.0324 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31198C #748C19
analogous
#193A8C #31198C #6B198C
triadic
#31198C #8C3119 #198C31
tetradic
#31198C #8C193A #748C19 #198C6B
square
#31198C #8C193A #748C19 #198C6B
split-complementary
#31198C #8C6B19 #3A8C19
monochromatic
#0D0624 #1F1058 #31198C #4322C0 #6342DD

Accessibility & contrast

On white

12.74
#31198C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#31198C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31198C
12.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31198C#FFFFFF#000000##FFFFFF
##31198C1.0012.741.6512.74
#FFFFFF12.741.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00368F
Deuteranopia (green-blind)
#002E8A
Tritanopia (blue-blind)
#003C53
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31198c;
/* rgb */ color: rgb(49, 25, 140);
/* oklch */ color: oklch(33.8% 0.173 281.4);
Tailwind
colors: {
  custom: {
    50: '#765aaf',
    500: '#31198c',
    950: '#000000',
  },
}
SCSS
$custom: #31198c;
$custom-light: #765aaf;
$custom-dark: #000000;
JSON
{
  "hex": "#31198c",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 140
  },
  "hsl": {
    "h": 252.522,
    "s": 69.697,
    "l": 32.353
  },
  "oklch": {
    "l": 0.33841,
    "c": 0.17328,
    "h": 281.4
  },
  "luminance": 0.03242
}

Semantic roles & 50–950 ramp

primary
#31198C
secondary
#A4BE43
accent
#ED3BC8
background
#F7F5FA
surface
#EEE9F5
border
#C9C5CF
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #31198C

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

Preview Lab → · Contrast checker → · Palette generator →

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