#311784#311784

#311784 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.7% C 0.166 H 283.3°. Best body text is #FFFFFF at 13.24:1 contrast (WCAG AA passes).

Color values

HEX#311784
RGBrgb(49, 23, 132)
HSLhsl(254, 70%, 30%)
HSVhsv(254, 83%, 52%)
CMYKcmyk(62.9%, 82.6%, 0%, 48.2%)
CIE-LABlab(19.77, 41.96, -55.85)
CIE-LCHlch(19.77, 69.86, 306.92°)
OKLaboklab(32.73% 0.0381 -0.161)
OKLCHoklch(32.73% 0.166 283.3)
XYZxyz(5.7366, 2.9313, 22.0888)
Luminance0.0293 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311784 #6A8417
analogous
#173384 #311784 #671784
triadic
#311784 #843117 #178431
tetradic
#311784 #841733 #6A8417 #178467
square
#311784 #841733 #6A8417 #178467
split-complementary
#311784 #846717 #338417
monochromatic
#0A051C #1E0E50 #311784 #4420B8 #6039DC

Accessibility & contrast

On white

13.24
#311784 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.59
#311784 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311784
13.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311784#FFFFFF#000000##FFFFFF
##3117841.0013.241.5913.24
#FFFFFF13.241.0021.001.00
#0000001.5921.001.0021.00
##FFFFFF13.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003387
Deuteranopia (green-blind)
#002C82
Tritanopia (blue-blind)
#00384E
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #311784;
/* rgb */ color: rgb(49, 23, 132);
/* oklch */ color: oklch(32.7% 0.166 283.3);
Tailwind
colors: {
  custom: {
    50: '#7559a9',
    500: '#311784',
    950: '#000000',
  },
}
SCSS
$custom: #311784;
$custom-light: #7559a9;
$custom-dark: #000000;
JSON
{
  "hex": "#311784",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 132
  },
  "hsl": {
    "h": 254.312,
    "s": 70.323,
    "l": 30.392
  },
  "oklch": {
    "l": 0.32733,
    "c": 0.1655,
    "h": 283.3
  },
  "luminance": 0.02932
}

Semantic roles & 50–950 ramp

primary
#311784
secondary
#9BB83F
accent
#ED3BC3
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311784

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

Preview Lab → · Contrast checker → · Palette generator →

#311784 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva