#31217F#31217F

#31217F is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.5% C 0.149 H 282.6°. Best body text is #FFFFFF at 12.69:1 contrast (WCAG AA passes).

Color values

HEX#31217F
RGBrgb(49, 33, 127)
HSLhsl(250, 59%, 31%)
HSVhsv(250, 74%, 50%)
CMYKcmyk(61.4%, 74%, 0%, 50.2%)
CIE-LABlab(21.10, 35.09, -50.49)
CIE-LCHlch(21.10, 61.48, 304.80°)
OKLaboklab(33.51% 0.0324 -0.1455)
OKLCHoklch(33.51% 0.149 282.6)
XYZxyz(5.6401, 3.2726, 20.4090)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#31217F #6F7F21
analogous
#21407F #31217F #60217F
triadic
#31217F #7F3121 #217F31
tetradic
#31217F #7F2140 #6F7F21 #217F60
square
#31217F #7F2140 #6F7F21 #217F60
split-complementary
#31217F #7F6021 #407F21
monochromatic
#0C081E #1E144E #31217F #442EB0 #614AD0

Accessibility & contrast

On white

12.69
#31217F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#31217F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #31217F
12.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##31217F#FFFFFF#000000##FFFFFF
##31217F1.0012.691.6512.69
#FFFFFF12.691.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.691.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003682
Deuteranopia (green-blind)
#002F7D
Tritanopia (blue-blind)
#003B4D
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #31217f;
/* rgb */ color: rgb(49, 33, 127);
/* oklch */ color: oklch(33.5% 0.149 282.6);
Tailwind
colors: {
  custom: {
    50: '#735ea5',
    500: '#31217f',
    950: '#000000',
  },
}
SCSS
$custom: #31217f;
$custom-light: #735ea5;
$custom-dark: #000000;
JSON
{
  "hex": "#31217f",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 127
  },
  "hsl": {
    "h": 250.213,
    "s": 58.75,
    "l": 31.373
  },
  "oklch": {
    "l": 0.33514,
    "c": 0.14904,
    "h": 282.6
  },
  "luminance": 0.03273
}

Semantic roles & 50–950 ramp

primary
#31217F
secondary
#A0B24A
accent
#E246C7
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #31217F

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

Preview Lab → · Contrast checker → · Palette generator →

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