#312174#312174

#312174 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 32.4% C 0.135 H 284.9°. Best body text is #FFFFFF at 13.12:1 contrast (WCAG AA passes).

Color values

HEX#312174
RGBrgb(49, 33, 116)
HSLhsl(252, 56%, 29%)
HSVhsv(252, 72%, 45%)
CMYKcmyk(57.8%, 71.6%, 0%, 54.5%)
CIE-LABlab(20.05, 31.49, -45.20)
CIE-LCHlch(20.05, 55.08, 304.86°)
OKLaboklab(32.44% 0.0346 -0.13)
OKLCHoklch(32.44% 0.135 284.9)
XYZxyz(4.9619, 3.0013, 16.8375)
Luminance0.0300 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312174 #647421
analogous
#213B74 #312174 #5B2174
triadic
#312174 #743121 #217431
tetradic
#312174 #74213B #647421 #21745B
square
#312174 #74213B #647421 #21745B
split-complementary
#312174 #745B21 #3B7421
monochromatic
#0A0718 #1D1344 #312174 #452FA4 #5F45CA

Accessibility & contrast

On white

13.12
#312174 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.60
#312174 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312174
13.12:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312174#FFFFFF#000000##FFFFFF
##3121741.0013.121.6013.12
#FFFFFF13.121.0021.001.00
#0000001.6021.001.0021.00
##FFFFFF13.121.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003377
Deuteranopia (green-blind)
#002E72
Tritanopia (blue-blind)
#123647
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #312174;
/* rgb */ color: rgb(49, 33, 116);
/* oklch */ color: oklch(32.4% 0.135 284.9);
Tailwind
colors: {
  custom: {
    50: '#715e9d',
    500: '#312174',
    950: '#000000',
  },
}
SCSS
$custom: #312174;
$custom-light: #715e9d;
$custom-dark: #000000;
JSON
{
  "hex": "#312174",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 116
  },
  "hsl": {
    "h": 251.566,
    "s": 55.705,
    "l": 29.216
  },
  "oklch": {
    "l": 0.32437,
    "c": 0.1345,
    "h": 284.9
  },
  "luminance": 0.03002
}

Semantic roles & 50–950 ramp

primary
#312174
secondary
#95A749
accent
#DF49C2
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #312174

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

Preview Lab → · Contrast checker → · Palette generator →

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