#31198A#31198A

#31198A is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.6% C 0.171 H 281.8°. Best body text is #FFFFFF at 12.83:1 contrast (WCAG AA passes).

Color values

HEX#31198A
RGBrgb(49, 25, 138)
HSLhsl(253, 69%, 32%)
HSVhsv(253, 82%, 54%)
CMYKcmyk(64.5%, 81.9%, 0%, 45.9%)
CIE-LABlab(20.76, 42.82, -57.98)
CIE-LCHlch(20.76, 72.08, 306.45°)
OKLaboklab(33.62% 0.035 -0.1673)
OKLCHoklch(33.62% 0.171 281.8)
XYZxyz(6.2003, 3.1827, 24.3274)
Luminance0.0318 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31198A #728A19
analogous
#193A8A #31198A #69198A
triadic
#31198A #8A3119 #198A31
tetradic
#31198A #8A193A #728A19 #198A69
square
#31198A #8A193A #728A19 #198A69
split-complementary
#31198A #8A6919 #3A8A19
monochromatic
#0C0622 #1F1056 #31198A #4322BE #6241DD

Accessibility & contrast

On white

12.83
#31198A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #31198A
12.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31198A#FFFFFF#000000##FFFFFF
##31198A1.0012.831.6412.83
#FFFFFF12.831.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.831.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #31198a;
/* rgb */ color: rgb(49, 25, 138);
/* oklch */ color: oklch(33.6% 0.171 281.8);
Tailwind
colors: {
  custom: {
    50: '#765aad',
    500: '#31198a',
    950: '#000000',
  },
}
SCSS
$custom: #31198a;
$custom-light: #765aad;
$custom-dark: #000000;
JSON
{
  "hex": "#31198a",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 138
  },
  "hsl": {
    "h": 252.743,
    "s": 69.325,
    "l": 31.961
  },
  "oklch": {
    "l": 0.3362,
    "c": 0.17089,
    "h": 281.8
  },
  "luminance": 0.03183
}

Semantic roles & 50–950 ramp

primary
#31198A
secondary
#A3BD42
accent
#EC3CC7
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #31198A

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

Preview Lab → · Contrast checker → · Palette generator →

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