#31197A#31197A

#31197A is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.9% C 0.151 H 285.3°. Best body text is #FFFFFF at 13.54:1 contrast (WCAG AA passes).

Color values

HEX#31197A
RGBrgb(49, 25, 122)
HSLhsl(255, 66%, 29%)
HSVhsv(255, 80%, 48%)
CMYKcmyk(59.8%, 79.5%, 0%, 52.2%)
CIE-LABlab(19.03, 37.93, -50.72)
CIE-LCHlch(19.03, 63.33, 306.79°)
OKLaboklab(31.89% 0.04 -0.1461)
OKLCHoklch(31.89% 0.151 285.3)
XYZxyz(5.1260, 2.7531, 18.6699)
Luminance0.0275 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31197A #627A19
analogous
#19327A #31197A #62197A
triadic
#31197A #7A3119 #197A31
tetradic
#31197A #7A1932 #627A19 #197A62
square
#31197A #7A1932 #627A19 #197A62
split-complementary
#31197A #7A6219 #327A19
monochromatic
#0A0519 #1D0F47 #31197A #4523AD #5F37D6

Accessibility & contrast

On white

13.54
#31197A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.55
#31197A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31197A
13.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31197A#FFFFFF#000000##FFFFFF
##31197A1.0013.541.5513.54
#FFFFFF13.541.0021.001.00
#0000001.5521.001.0021.00
##FFFFFF13.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00317D
Deuteranopia (green-blind)
#002B78
Tritanopia (blue-blind)
#0A3549
Achromatopsia (no color)
#2E2E2E

Design tokens & code

CSS
--color: #31197a;
/* rgb */ color: rgb(49, 25, 122);
/* oklch */ color: oklch(31.9% 0.151 285.3);
Tailwind
colors: {
  custom: {
    50: '#7359a1',
    500: '#31197a',
    950: '#000000',
  },
}
SCSS
$custom: #31197a;
$custom-light: #7359a1;
$custom-dark: #000000;
JSON
{
  "hex": "#31197a",
  "rgb": {
    "r": 49,
    "g": 25,
    "b": 122
  },
  "hsl": {
    "h": 254.845,
    "s": 65.986,
    "l": 28.824
  },
  "oklch": {
    "l": 0.31894,
    "c": 0.15147,
    "h": 285.3
  },
  "luminance": 0.02753
}

Semantic roles & 50–950 ramp

primary
#31197A
secondary
#93AF40
accent
#E93FBF
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31197A

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

Preview Lab → · Contrast checker → · Palette generator →

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