#311161#311161

#311161 is a dark, vivid violet. Relative luminance 0.019; OKLCH L 28.3% C 0.129 H 294.8°. Best body text is #FFFFFF at 15.18:1 contrast (WCAG AA passes).

Color values

HEX#311161
RGBrgb(49, 17, 97)
HSLhsl(264, 70%, 22%)
HSVhsv(264, 82%, 38%)
CMYKcmyk(49.5%, 82.5%, 0%, 62%)
CIE-LABlab(15.04, 34.48, -40.98)
CIE-LCHlch(15.04, 53.55, 310.08°)
OKLaboklab(28.33% 0.0543 -0.1175)
OKLCHoklch(28.33% 0.129 294.8)
XYZxyz(3.6242, 1.9168, 11.4860)
Luminance0.0192 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#311161 #416111
analogous
#111961 #311161 #591161
triadic
#311161 #613111 #116131
tetradic
#311161 #611119 #416111 #116159
square
#311161 #611119 #416111 #116159
split-complementary
#311161 #615911 #196111
monochromatic
#0D051A #17082D #311161 #4B1A95 #6623C9

Accessibility & contrast

On white

15.18
#311161 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#311161 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #311161
15.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##311161#FFFFFF#000000##FFFFFF
##3111611.0015.181.3815.18
#FFFFFF15.181.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002663
Deuteranopia (green-blind)
#00245F
Tritanopia (blue-blind)
#232739
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #311161;
/* rgb */ color: rgb(49, 17, 97);
/* oklch */ color: oklch(28.3% 0.129 294.8);
Tailwind
colors: {
  custom: {
    50: '#6f538f',
    500: '#311161',
    950: '#000000',
  },
}
SCSS
$custom: #311161;
$custom-light: #6f538f;
$custom-dark: #000000;
JSON
{
  "hex": "#311161",
  "rgb": {
    "r": 49,
    "g": 17,
    "b": 97
  },
  "hsl": {
    "h": 264,
    "s": 70.175,
    "l": 22.353
  },
  "oklch": {
    "l": 0.28328,
    "c": 0.12941,
    "h": 294.8
  },
  "luminance": 0.01917
}

Semantic roles & 50–950 ramp

primary
#311161
secondary
#719934
accent
#ED3BA6
background
#F7F4F8
surface
#EDE7F0
border
#C8C3CB
text
#08030C
muted
#7B787D

Preview Lab

Preview with #311161

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

Preview Lab → · Contrast checker → · Palette generator →

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