#31197D#31197D

#31197D is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.2% C 0.155 H 284.6°. Best body text is #FFFFFF at 13.41:1 contrast (WCAG AA passes).

Color values

HEX#31197D
RGBrgb(49, 25, 125)
HSLhsl(254, 67%, 29%)
HSVhsv(254, 80%, 49%)
CMYKcmyk(60.8%, 80%, 0%, 51%)
CIE-LABlab(19.34, 38.85, -52.11)
CIE-LCHlch(19.34, 65.00, 306.71°)
OKLaboklab(32.21% 0.0391 -0.1502)
OKLCHoklch(32.21% 0.155 284.6)
XYZxyz(5.3148, 2.8286, 19.6640)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31197D #657D19
analogous
#19337D #31197D #63197D
triadic
#31197D #7D3119 #197D31
tetradic
#31197D #7D1933 #657D19 #197D63
square
#31197D #7D1933 #657D19 #197D63
split-complementary
#31197D #7D6319 #337D19
monochromatic
#0A051A #1D0F4A #31197D #4523B0 #5F39D7

Accessibility & contrast

On white

13.41
#31197D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#31197D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31197D
13.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31197D#FFFFFF#000000##FFFFFF
##31197D1.0013.411.5713.41
#FFFFFF13.411.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003280
Deuteranopia (green-blind)
#002C7B
Tritanopia (blue-blind)
#04364A
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #31197d;
/* rgb */ color: rgb(49, 25, 125);
/* oklch */ color: oklch(32.2% 0.155 284.6);
Tailwind
colors: {
  custom: {
    50: '#7359a4',
    500: '#31197d',
    950: '#000000',
  },
}
SCSS
$custom: #31197d;
$custom-light: #7359a4;
$custom-dark: #000000;
JSON
{
  "hex": "#31197d",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 125
  },
  "hsl": {
    "h": 254.4,
    "s": 66.667,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32211,
    "c": 0.15516,
    "h": 284.6
  },
  "luminance": 0.02829
}

Semantic roles & 50–950 ramp

primary
#31197D
secondary
#96B140
accent
#EA3EC0
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31197D

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

Preview Lab → · Contrast checker → · Palette generator →

#31197D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva