#312181#312181

#312181 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.7% C 0.152 H 282.2°. Best body text is #FFFFFF at 12.61:1 contrast (WCAG AA passes).

Color values

HEX#312181
RGBrgb(49, 33, 129)
HSLhsl(250, 59%, 32%)
HSVhsv(250, 74%, 51%)
CMYKcmyk(62%, 74.4%, 0%, 49.4%)
CIE-LABlab(21.30, 35.74, -51.43)
CIE-LCHlch(21.30, 62.63, 304.80°)
OKLaboklab(33.72% 0.032 -0.1482)
OKLCHoklch(33.72% 0.152 282.2)
XYZxyz(5.7717, 3.3253, 21.1023)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312181 #718121
analogous
#214181 #312181 #612181
triadic
#312181 #813121 #218131
tetradic
#312181 #812141 #718121 #218161
square
#312181 #812141 #718121 #218161
split-complementary
#312181 #816121 #418121
monochromatic
#0C0820 #1E1550 #312181 #442DB2 #624BD1

Accessibility & contrast

On white

12.61
#312181 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#312181 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312181
12.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312181#FFFFFF#000000##FFFFFF
##3121811.0012.611.6712.61
#FFFFFF12.611.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003684
Deuteranopia (green-blind)
#00307F
Tritanopia (blue-blind)
#003B4F
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #312181;
/* rgb */ color: rgb(49, 33, 129);
/* oklch */ color: oklch(33.7% 0.152 282.2);
Tailwind
colors: {
  custom: {
    50: '#745ea7',
    500: '#312181',
    950: '#000000',
  },
}
SCSS
$custom: #312181;
$custom-light: #745ea7;
$custom-dark: #000000;
JSON
{
  "hex": "#312181",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 129
  },
  "hsl": {
    "h": 250,
    "s": 59.259,
    "l": 31.765
  },
  "oklch": {
    "l": 0.33715,
    "c": 0.15163,
    "h": 282.2
  },
  "luminance": 0.03326
}

Semantic roles & 50–950 ramp

primary
#312181
secondary
#A2B44A
accent
#E245C8
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#09040F
muted
#7B797F

Preview Lab

Preview with #312181

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

Preview Lab → · Contrast checker → · Palette generator →

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