#311D52#311D52

#311D52 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.7% C 0.093 H 297.6°. Best body text is #FFFFFF at 14.70:1 contrast (WCAG AA passes).

Color values

HEX#311D52
RGBrgb(49, 29, 82)
HSLhsl(263, 48%, 22%)
HSVhsv(263, 65%, 32%)
CMYKcmyk(40.2%, 64.6%, 0%, 67.8%)
CIE-LABlab(16.21, 23.10, -29.01)
CIE-LCHlch(16.21, 37.08, 308.53°)
OKLaboklab(28.75% 0.0432 -0.0824)
OKLCHoklch(28.75% 0.093 297.6)
XYZxyz(3.2286, 2.1408, 8.2241)
Luminance0.0214 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311D52 #3E521D
analogous
#1D2352 #311D52 #4C1D52
triadic
#311D52 #52311D #1D5231
tetradic
#311D52 #521D23 #3E521D #1D524C
square
#311D52 #521D23 #3E521D #1D524C
split-complementary
#311D52 #524C1D #23521D
monochromatic
#0E0817 #160D25 #311D52 #4C2D7F #673DAC

Accessibility & contrast

On white

14.70
#311D52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#311D52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311D52
14.70:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311D52#FFFFFF#000000##FFFFFF
##311D521.0014.701.4314.70
#FFFFFF14.701.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.701.0021.001.00

Color blindness preview

Protanopia (red-blind)
#012854
Deuteranopia (green-blind)
#092851
Tritanopia (blue-blind)
#292834
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #311d52;
/* rgb */ color: rgb(49, 29, 82);
/* oklch */ color: oklch(28.7% 0.093 297.6);
Tailwind
colors: {
  custom: {
    50: '#6c5a83',
    500: '#311d52',
    950: '#000000',
  },
}
SCSS
$custom: #311d52;
$custom-light: #6c5a83;
$custom-dark: #000000;
JSON
{
  "hex": "#311d52",
  "rgb": {
    "r": 49,
    "g": 29,
    "b": 82
  },
  "hsl": {
    "h": 262.642,
    "s": 47.748,
    "l": 21.765
  },
  "oklch": {
    "l": 0.28748,
    "c": 0.09301,
    "h": 297.6
  },
  "luminance": 0.02141
}

Semantic roles & 50–950 ramp

primary
#311D52
secondary
#6E8744
accent
#D750A4
background
#F6F5F8
surface
#EBE9EF
border
#C6C5CA
text
#07040A
muted
#7A797C

Preview Lab

Preview with #311D52

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

Preview Lab → · Contrast checker → · Palette generator →

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