#311781#311781

#311781 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.4% C 0.162 H 284.0°. Best body text is #FFFFFF at 13.37:1 contrast (WCAG AA passes).

Color values

HEX#311781
RGBrgb(49, 23, 129)
HSLhsl(255, 70%, 30%)
HSVhsv(255, 82%, 51%)
CMYKcmyk(62%, 82.2%, 0%, 49.4%)
CIE-LABlab(19.43, 41.06, -54.50)
CIE-LCHlch(19.43, 68.24, 306.99°)
OKLaboklab(32.4% 0.0391 -0.1571)
OKLCHoklch(32.4% 0.162 284)
XYZxyz(5.5342, 2.8504, 21.0232)
Luminance0.0285 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311781 #678117
analogous
#173281 #311781 #661781
triadic
#311781 #813117 #178131
tetradic
#311781 #811732 #678117 #178166
square
#311781 #811732 #678117 #178166
split-complementary
#311781 #816617 #328117
monochromatic
#0A051A #1D0E4D #311781 #4520B5 #5F37DB

Accessibility & contrast

On white

13.37
#311781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.57
#311781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311781
13.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311781#FFFFFF#000000##FFFFFF
##3117811.0013.371.5713.37
#FFFFFF13.371.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003284
Deuteranopia (green-blind)
#002C7F
Tritanopia (blue-blind)
#00374C
Achromatopsia (no color)
#2F2F2F

Design tokens & code

CSS
--color: #311781;
/* rgb */ color: rgb(49, 23, 129);
/* oklch */ color: oklch(32.4% 0.162 284.0);
Tailwind
colors: {
  custom: {
    50: '#7458a7',
    500: '#311781',
    950: '#000000',
  },
}
SCSS
$custom: #311781;
$custom-light: #7458a7;
$custom-dark: #000000;
JSON
{
  "hex": "#311781",
  "rgb": {
    "r": 49,
    "g": 23,
    "b": 129
  },
  "hsl": {
    "h": 254.717,
    "s": 69.737,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32404,
    "c": 0.16191,
    "h": 284
  },
  "luminance": 0.02851
}

Semantic roles & 50–950 ramp

primary
#311781
secondary
#98B53E
accent
#ED3BC1
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #311781

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

Preview Lab → · Contrast checker → · Palette generator →

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