#311B71#311B71

#311B71 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.2% C 0.138 H 287.2°. Best body text is #FFFFFF at 13.76:1 contrast (WCAG AA passes).

Color values

HEX#311B71
RGBrgb(49, 27, 113)
HSLhsl(255, 61%, 27%)
HSVhsv(255, 76%, 44%)
CMYKcmyk(56.6%, 76.1%, 0%, 55.7%)
CIE-LABlab(18.49, 34.05, -45.81)
CIE-LCHlch(18.49, 57.08, 306.62°)
OKLaboklab(31.24% 0.0408 -0.1317)
OKLCHoklch(31.24% 0.138 287.2)
XYZxyz(4.6383, 2.6288, 15.8826)
Luminance0.0263 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B71 #5B711B
analogous
#1B3071 #311B71 #5C1B71
triadic
#311B71 #71311B #1B7131
tetradic
#311B71 #711B30 #5B711B #1B715C
square
#311B71 #711B30 #5B711B #1B715C
split-complementary
#311B71 #715C1B #30711B
monochromatic
#0B0619 #1C0F40 #311B71 #4627A2 #5E37CF

Accessibility & contrast

On white

13.76
#311B71 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#311B71 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B71
13.76:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B71#FFFFFF#000000##FFFFFF
##311B711.0013.761.5313.76
#FFFFFF13.761.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.761.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F74
Deuteranopia (green-blind)
#002B6F
Tritanopia (blue-blind)
#163244
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #311b71;
/* rgb */ color: rgb(49, 27, 113);
/* oklch */ color: oklch(31.2% 0.138 287.2);
Tailwind
colors: {
  custom: {
    50: '#715a9b',
    500: '#311b71',
    950: '#000000',
  },
}
SCSS
$custom: #311b71;
$custom-light: #715a9b;
$custom-dark: #000000;
JSON
{
  "hex": "#311b71",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 113
  },
  "hsl": {
    "h": 255.349,
    "s": 61.429,
    "l": 27.451
  },
  "oklch": {
    "l": 0.31239,
    "c": 0.13792,
    "h": 287.2
  },
  "luminance": 0.02629
}

Semantic roles & 50–950 ramp

primary
#311B71
secondary
#8CA642
accent
#E543BB
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#08040E
muted
#7B797E

Preview Lab

Preview with #311B71

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

Preview Lab → · Contrast checker → · Palette generator →

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