#312151#312151

#312151 is a dark, moderate violet. Relative luminance 0.023; OKLCH L 29.4% C 0.085 H 296.2°. Best body text is #FFFFFF at 14.31:1 contrast (WCAG AA passes).

Color values

HEX#312151
RGBrgb(49, 33, 81)
HSLhsl(260, 42%, 22%)
HSVhsv(260, 59%, 32%)
CMYKcmyk(39.5%, 59.3%, 0%, 68.2%)
CIE-LABlab(17.15, 20.13, -26.81)
CIE-LCHlch(17.15, 33.53, 306.90°)
OKLaboklab(29.42% 0.0373 -0.0759)
OKLCHoklch(29.42% 0.085 296.2)
XYZxyz(3.2953, 2.3347, 8.0600)
Luminance0.0233 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#312151 #415121
analogous
#212951 #312151 #492151
triadic
#312151 #513121 #215131
tetradic
#312151 #512129 #415121 #215149
square
#312151 #512129 #415121 #215149
split-complementary
#312151 #514921 #295121
monochromatic
#0D0916 #170F26 #312151 #4B337C #6644A8

Accessibility & contrast

On white

14.31
#312151 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.47
#312151 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #312151
14.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##312151#FFFFFF#000000##FFFFFF
##3121511.0014.311.4714.31
#FFFFFF14.311.0021.001.00
#0000001.4721.001.0021.00
##FFFFFF14.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0C2A53
Deuteranopia (green-blind)
#112A50
Tritanopia (blue-blind)
#2A2B35
Achromatopsia (no color)
#2A2A2A

Design tokens & code

CSS
--color: #312151;
/* rgb */ color: rgb(49, 33, 81);
/* oklch */ color: oklch(29.4% 0.085 296.2);
Tailwind
colors: {
  custom: {
    50: '#6b5d82',
    500: '#312151',
    950: '#000000',
  },
}
SCSS
$custom: #312151;
$custom-light: #6b5d82;
$custom-dark: #000000;
JSON
{
  "hex": "#312151",
  "rgb": {
    "r": 49,
    "g": 33,
    "b": 81
  },
  "hsl": {
    "h": 260,
    "s": 42.105,
    "l": 22.353
  },
  "oklch": {
    "l": 0.29419,
    "c": 0.08463,
    "h": 296.2
  },
  "luminance": 0.02335
}

Semantic roles & 50–950 ramp

primary
#312151
secondary
#718549
accent
#D256A9
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #312151

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

Preview Lab → · Contrast checker → · Palette generator →

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