#311F71#311F71

#311F71 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 31.8% C 0.133 H 286.2°. Best body text is #FFFFFF at 13.42:1 contrast (WCAG AA passes).

Color values

HEX#311F71
RGBrgb(49, 31, 113)
HSLhsl(253, 57%, 28%)
HSVhsv(253, 73%, 44%)
CMYKcmyk(56.6%, 72.6%, 0%, 55.7%)
CIE-LABlab(19.33, 31.72, -44.44)
CIE-LCHlch(19.33, 54.60, 305.51°)
OKLaboklab(31.84% 0.0371 -0.1277)
OKLCHoklch(31.84% 0.133 286.2)
XYZxyz(4.7364, 2.8249, 15.9153)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311F71 #5F711F
analogous
#1F3671 #311F71 #5A1F71
triadic
#311F71 #71311F #1F7131
tetradic
#311F71 #711F36 #5F711F #1F715A
square
#311F71 #711F36 #5F711F #1F715A
split-complementary
#311F71 #715A1F #36711F
monochromatic
#0A0718 #1C1241 #311F71 #462CA1 #5E40CB

Accessibility & contrast

On white

13.42
#311F71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#311F71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311F71
13.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311F71#FFFFFF#000000##FFFFFF
##311F711.0013.421.5713.42
#FFFFFF13.421.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003173
Deuteranopia (green-blind)
#002C6F
Tritanopia (blue-blind)
#163445
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311f71;
/* rgb */ color: rgb(49, 31, 113);
/* oklch */ color: oklch(31.8% 0.133 286.2);
Tailwind
colors: {
  custom: {
    50: '#715c9b',
    500: '#311f71',
    950: '#000000',
  },
}
SCSS
$custom: #311f71;
$custom-light: #715c9b;
$custom-dark: #000000;
JSON
{
  "hex": "#311f71",
  "rgb": {
    "r": 49,
    "g": 31,
    "b": 113
  },
  "hsl": {
    "h": 253.171,
    "s": 56.944,
    "l": 28.235
  },
  "oklch": {
    "l": 0.31835,
    "c": 0.13302,
    "h": 286.2
  },
  "luminance": 0.02825
}

Semantic roles & 50–950 ramp

primary
#311F71
secondary
#90A547
accent
#E048BF
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #311F71

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

Preview Lab → · Contrast checker → · Palette generator →

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