#312170#312170

#312170 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.1% C 0.129 H 285.9°. Best body text is #FFFFFF at 13.27:1 contrast (WCAG AA passes).

Color values

HEX#312170
RGBrgb(49, 33, 112)
HSLhsl(252, 54%, 28%)
HSVhsv(252, 71%, 44%)
CMYKcmyk(56.3%, 70.5%, 0%, 56.1%)
CIE-LABlab(19.68, 30.17, -43.22)
CIE-LCHlch(19.68, 52.71, 304.92°)
OKLaboklab(32.06% 0.0353 -0.1242)
OKLCHoklch(32.06% 0.129 285.9)
XYZxyz(4.7342, 2.9103, 15.6384)
Luminance0.0291 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312170 #607021
analogous
#213870 #312170 #582170
triadic
#312170 #703121 #217031
tetradic
#312170 #702138 #607021 #217058
square
#312170 #702138 #607021 #217058
split-complementary
#312170 #705821 #387021
monochromatic
#0A0718 #1C1341 #312170 #462F9F #5E44C8

Accessibility & contrast

On white

13.27
#312170 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#312170 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312170
13.27:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312170#FFFFFF#000000##FFFFFF
##3121701.0013.271.5813.27
#FFFFFF13.271.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003272
Deuteranopia (green-blind)
#002D6E
Tritanopia (blue-blind)
#173545
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #312170;
/* rgb */ color: rgb(49, 33, 112);
/* oklch */ color: oklch(32.1% 0.129 285.9);
Tailwind
colors: {
  custom: {
    50: '#705d9a',
    500: '#312170',
    950: '#000000',
  },
}
SCSS
$custom: #312170;
$custom-light: #705d9a;
$custom-dark: #000000;
JSON
{
  "hex": "#312170",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 112
  },
  "hsl": {
    "h": 252.152,
    "s": 54.483,
    "l": 28.431
  },
  "oklch": {
    "l": 0.32059,
    "c": 0.12908,
    "h": 285.9
  },
  "luminance": 0.02911
}

Semantic roles & 50–950 ramp

primary
#312170
secondary
#91A449
accent
#DE4AC0
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #312170

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

Preview Lab → · Contrast checker → · Palette generator →

#312170 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva