#331793#331793

#331793 is a dark, vivid violet. Relative luminance 0.034; OKLCH L 34.6% C 0.183 H 281.4°. Best body text is #FFFFFF at 12.47:1 contrast (WCAG AA passes).

Color values

HEX#331793
RGBrgb(51, 23, 147)
HSLhsl(254, 73%, 33%)
HSVhsv(254, 84%, 58%)
CMYKcmyk(65.3%, 84.4%, 0%, 42.4%)
CIE-LABlab(21.66, 46.61, -62.09)
CIE-LCHlch(21.66, 77.63, 306.89°)
OKLaboklab(34.59% 0.0362 -0.1791)
OKLCHoklch(34.59% 0.183 281.4)
XYZxyz(6.9364, 3.4227, 27.8932)
Luminance0.0342 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331793 #779317
analogous
#173993 #331793 #711793
triadic
#331793 #933317 #179333
tetradic
#331793 #931739 #779317 #179371
square
#331793 #931739 #779317 #179371
split-complementary
#331793 #937117 #399317
monochromatic
#0E0629 #210F5E #331793 #451FC8 #6743E2

Accessibility & contrast

On white

12.47
#331793 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.68
#331793 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331793
12.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331793#FFFFFF#000000##FFFFFF
##3317931.0012.471.6812.47
#FFFFFF12.471.0021.001.00
#0000001.6821.001.0021.00
##FFFFFF12.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003896
Deuteranopia (green-blind)
#002F91
Tritanopia (blue-blind)
#003E57
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331793;
/* rgb */ color: rgb(51, 23, 147);
/* oklch */ color: oklch(34.6% 0.183 281.4);
Tailwind
colors: {
  custom: {
    50: '#795ab4',
    500: '#331793',
    950: '#000000',
  },
}
SCSS
$custom: #331793;
$custom-light: #795ab4;
$custom-dark: #000000;
JSON
{
  "hex": "#331793",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 147
  },
  "hsl": {
    "h": 253.548,
    "s": 72.941,
    "l": 33.333
  },
  "oklch": {
    "l": 0.3459,
    "c": 0.18275,
    "h": 281.4
  },
  "luminance": 0.03423
}

Semantic roles & 50–950 ramp

primary
#331793
secondary
#A6C244
accent
#F038C6
background
#F8F5FB
surface
#EFE9F6
border
#CAC5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331793

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

Preview Lab → · Contrast checker → · Palette generator →

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