#31217C#31217C

#31217C is a dark, vivid violet. Relative luminance 0.032; OKLCH L 33.2% C 0.145 H 283.2°. Best body text is #FFFFFF at 12.81:1 contrast (WCAG AA passes).

Color values

HEX#31217C
RGBrgb(49, 33, 124)
HSLhsl(251, 58%, 31%)
HSVhsv(251, 73%, 49%)
CMYKcmyk(60.5%, 73.4%, 0%, 51.4%)
CIE-LABlab(20.81, 34.11, -49.06)
CIE-LCHlch(20.81, 59.76, 304.81°)
OKLaboklab(33.22% 0.0331 -0.1413)
OKLCHoklch(33.22% 0.145 283.2)
XYZxyz(5.4474, 3.1956, 19.3946)
Luminance0.0320 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31217C #6C7C21
analogous
#213E7C #31217C #5E217C
triadic
#31217C #7C3121 #217C31
tetradic
#31217C #7C213E #6C7C21 #217C5E
square
#31217C #7C213E #6C7C21 #217C5E
split-complementary
#31217C #7C5E21 #3E7C21
monochromatic
#0B071B #1E144C #31217C #442EAC #6049CF

Accessibility & contrast

On white

12.81
#31217C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.64
#31217C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31217C
12.81:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31217C#FFFFFF#000000##FFFFFF
##31217C1.0012.811.6412.81
#FFFFFF12.811.0021.001.00
#0000001.6421.001.0021.00
##FFFFFF12.811.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00357F
Deuteranopia (green-blind)
#002F7A
Tritanopia (blue-blind)
#04394C
Achromatopsia (no color)
#323232

Design tokens & code

CSS
--color: #31217c;
/* rgb */ color: rgb(49, 33, 124);
/* oklch */ color: oklch(33.2% 0.145 283.2);
Tailwind
colors: {
  custom: {
    50: '#735ea3',
    500: '#31217c',
    950: '#000000',
  },
}
SCSS
$custom: #31217c;
$custom-light: #735ea3;
$custom-dark: #000000;
JSON
{
  "hex": "#31217c",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 124
  },
  "hsl": {
    "h": 250.549,
    "s": 57.962,
    "l": 30.784
  },
  "oklch": {
    "l": 0.33215,
    "c": 0.14512,
    "h": 283.2
  },
  "luminance": 0.03196
}

Semantic roles & 50–950 ramp

primary
#31217C
secondary
#9DAF4A
accent
#E147C6
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31217C

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

Preview Lab → · Contrast checker → · Palette generator →

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