#311F52#311F52

#311F52 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.1% C 0.090 H 296.7°. Best body text is #FFFFFF at 14.50:1 contrast (WCAG AA passes).

Color values

HEX#311F52
RGBrgb(49, 31, 82)
HSLhsl(261, 45%, 22%)
HSVhsv(261, 62%, 32%)
CMYKcmyk(40.2%, 62.2%, 0%, 67.8%)
CIE-LABlab(16.71, 21.78, -28.20)
CIE-LCHlch(16.71, 35.64, 307.68°)
OKLaboklab(29.11% 0.0403 -0.08)
OKLCHoklch(29.11% 0.09 296.7)
XYZxyz(3.2792, 2.2421, 8.2410)
Luminance0.0224 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F52 #40521F
analogous
#1F2752 #311F52 #4B1F52
triadic
#311F52 #52311F #1F5231
tetradic
#311F52 #521F27 #40521F #1F524B
square
#311F52 #521F27 #40521F #1F524B
split-complementary
#311F52 #524B1F #27521F
monochromatic
#0D0816 #160E26 #311F52 #4C307E #6641AB

Accessibility & contrast

On white

14.50
#311F52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.45
#311F52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F52
14.50:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F52#FFFFFF#000000##FFFFFF
##311F521.0014.501.4514.50
#FFFFFF14.501.0021.001.00
#0000001.4521.001.0021.00
##FFFFFF14.501.0021.001.00

Color blindness preview

Protanopia (red-blind)
#062A54
Deuteranopia (green-blind)
#0C2951
Tritanopia (blue-blind)
#292A35
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #311f52;
/* rgb */ color: rgb(49, 31, 82);
/* oklch */ color: oklch(29.1% 0.090 296.7);
Tailwind
colors: {
  custom: {
    50: '#6c5b83',
    500: '#311f52',
    950: '#000000',
  },
}
SCSS
$custom: #311f52;
$custom-light: #6c5b83;
$custom-dark: #000000;
JSON
{
  "hex": "#311f52",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 82
  },
  "hsl": {
    "h": 261.176,
    "s": 45.133,
    "l": 22.157
  },
  "oklch": {
    "l": 0.29114,
    "c": 0.0896,
    "h": 296.7
  },
  "luminance": 0.02242
}

Semantic roles & 50–950 ramp

primary
#311F52
secondary
#708746
accent
#D553A7
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #311F52

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

Preview Lab → · Contrast checker → · Palette generator →

#311F52 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva