#311789#311789

#311789 is a dark, vivid violet. Relative luminance 0.031; OKLCH L 33.3% C 0.171 H 282.3°. Best body text is #FFFFFF at 13.01:1 contrast (WCAG AA passes).

Color values

HEX#311789
RGBrgb(49, 23, 137)
HSLhsl(254, 71%, 31%)
HSVhsv(254, 83%, 54%)
CMYKcmyk(64.2%, 83.2%, 0%, 46.3%)
CIE-LABlab(20.33, 43.46, -58.07)
CIE-LCHlch(20.33, 72.53, 306.81°)
OKLaboklab(33.29% 0.0364 -0.1675)
OKLCHoklch(33.29% 0.171 282.3)
XYZxyz(6.0870, 3.0715, 23.9342)
Luminance0.0307 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311789 #6F8917
analogous
#173689 #311789 #6A1789
triadic
#311789 #893117 #178931
tetradic
#311789 #891736 #6F8917 #17896A
square
#311789 #891736 #6F8917 #17896A
split-complementary
#311789 #896A17 #368917
monochromatic
#0C0520 #1E0E55 #311789 #4420BD #613CDE

Accessibility & contrast

On white

13.01
#311789 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.61
#311789 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311789
13.01:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311789#FFFFFF#000000##FFFFFF
##3117891.0013.011.6113.01
#FFFFFF13.011.0021.001.00
#0000001.6121.001.0021.00
##FFFFFF13.011.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00358C
Deuteranopia (green-blind)
#002D87
Tritanopia (blue-blind)
#003A51
Achromatopsia (no color)
#313131

Design tokens & code

CSS
--color: #311789;
/* rgb */ color: rgb(49, 23, 137);
/* oklch */ color: oklch(33.3% 0.171 282.3);
Tailwind
colors: {
  custom: {
    50: '#7659ad',
    500: '#311789',
    950: '#000000',
  },
}
SCSS
$custom: #311789;
$custom-light: #7659ad;
$custom-dark: #000000;
JSON
{
  "hex": "#311789",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 137
  },
  "hsl": {
    "h": 253.684,
    "s": 71.25,
    "l": 31.373
  },
  "oklch": {
    "l": 0.33287,
    "c": 0.17143,
    "h": 282.3
  },
  "luminance": 0.03072
}

Semantic roles & 50–950 ramp

primary
#311789
secondary
#A0BD3F
accent
#EE3AC5
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A0410
muted
#7C797F

Preview Lab

Preview with #311789

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

Preview Lab → · Contrast checker → · Palette generator →

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