#311B82#311B82

#311B82 is a dark, vivid violet. Relative luminance 0.030; OKLCH L 33.0% C 0.159 H 283.1°. Best body text is #FFFFFF at 13.05:1 contrast (WCAG AA passes).

Color values

HEX#311B82
RGBrgb(49, 27, 130)
HSLhsl(253, 66%, 31%)
HSVhsv(253, 79%, 51%)
CMYKcmyk(62.3%, 79.2%, 0%, 49%)
CIE-LABlab(20.24, 39.37, -53.81)
CIE-LCHlch(20.24, 66.68, 306.19°)
OKLaboklab(32.99% 0.0362 -0.1551)
OKLCHoklch(32.99% 0.159 283.1)
XYZxyz(5.6866, 3.0482, 21.4035)
Luminance0.0305 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311B82 #6C821B
analogous
#1B3882 #311B82 #641B82
triadic
#311B82 #82311B #1B8231
tetradic
#311B82 #821B38 #6C821B #1B8264
square
#311B82 #821B38 #6C821B #1B8264
split-complementary
#311B82 #82641B #38821B
monochromatic
#0B061D #1E104F #311B82 #4426B5 #6040D7

Accessibility & contrast

On white

13.05
#311B82 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#311B82 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311B82
13.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311B82#FFFFFF#000000##FFFFFF
##311B821.0013.051.6113.05
#FFFFFF13.051.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003485
Deuteranopia (green-blind)
#002D80
Tritanopia (blue-blind)
#00394E
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311b82;
/* rgb */ color: rgb(49, 27, 130);
/* oklch */ color: oklch(33.0% 0.159 283.1);
Tailwind
colors: {
  custom: {
    50: '#745ba7',
    500: '#311b82',
    950: '#000000',
  },
}
SCSS
$custom: #311b82;
$custom-light: #745ba7;
$custom-dark: #000000;
JSON
{
  "hex": "#311b82",
  "rgb": {
    "r": 49,
    "g": 27,
    "b": 130
  },
  "hsl": {
    "h": 252.816,
    "s": 65.605,
    "l": 30.784
  },
  "oklch": {
    "l": 0.32994,
    "c": 0.15931,
    "h": 283.1
  },
  "luminance": 0.03049
}

Semantic roles & 50–950 ramp

primary
#311B82
secondary
#9DB643
accent
#E93FC4
background
#F7F5FA
surface
#EDE9F4
border
#C8C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311B82

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

Preview Lab → · Contrast checker → · Palette generator →

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