#331796#331796

#331796 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.9% C 0.186 H 280.9°. Best body text is #FFFFFF at 12.33:1 contrast (WCAG AA passes).

Color values

HEX#331796
RGBrgb(51, 23, 150)
HSLhsl(253, 73%, 34%)
HSVhsv(253, 85%, 59%)
CMYKcmyk(66%, 84.7%, 0%, 41.2%)
CIE-LABlab(22.01, 47.48, -63.37)
CIE-LCHlch(22.01, 79.18, 306.84°)
OKLaboklab(34.93% 0.0351 -0.1829)
OKLCHoklch(34.93% 0.186 280.9)
XYZxyz(7.1749, 3.5180, 29.1492)
Luminance0.0352 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331796 #7A9617
analogous
#173B96 #331796 #731796
triadic
#331796 #963317 #179633
tetradic
#331796 #96173B #7A9617 #179673
square
#331796 #96173B #7A9617 #179673
split-complementary
#331796 #967317 #3B9617
monochromatic
#0F072C #210F61 #331796 #451FCB #6845E2

Accessibility & contrast

On white

12.33
#331796 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331796 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331796
12.33:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331796#FFFFFF#000000##FFFFFF
##3317961.0012.331.7012.33
#FFFFFF12.331.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.331.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003999
Deuteranopia (green-blind)
#003094
Tritanopia (blue-blind)
#003F59
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #331796;
/* rgb */ color: rgb(51, 23, 150);
/* oklch */ color: oklch(34.9% 0.186 280.9);
Tailwind
colors: {
  custom: {
    50: '#7a5ab6',
    500: '#331796',
    950: '#000000',
  },
}
SCSS
$custom: #331796;
$custom-light: #7a5ab6;
$custom-dark: #000000;
JSON
{
  "hex": "#331796",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 150
  },
  "hsl": {
    "h": 253.228,
    "s": 73.41,
    "l": 33.922
  },
  "oklch": {
    "l": 0.3493,
    "c": 0.18621,
    "h": 280.9
  },
  "luminance": 0.03519
}

Semantic roles & 50–950 ramp

primary
#331796
secondary
#A8C345
accent
#F038C7
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331796

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

Preview Lab → · Contrast checker → · Palette generator →

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