#331794#331794

#331794 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.7% C 0.184 H 281.2°. Best body text is #FFFFFF at 12.42:1 contrast (WCAG AA passes).

Color values

HEX#331794
RGBrgb(51, 23, 148)
HSLhsl(253, 73%, 34%)
HSVhsv(253, 84%, 58%)
CMYKcmyk(65.5%, 84.5%, 0%, 42%)
CIE-LABlab(21.78, 46.90, -62.51)
CIE-LCHlch(21.78, 78.15, 306.88°)
OKLaboklab(34.7% 0.0358 -0.1804)
OKLCHoklch(34.7% 0.184 281.2)
XYZxyz(7.0152, 3.4542, 28.3083)
Luminance0.0345 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331794 #789417
analogous
#173994 #331794 #711794
triadic
#331794 #943317 #179433
tetradic
#331794 #941739 #789417 #179471
square
#331794 #941739 #789417 #179471
split-complementary
#331794 #947117 #399417
monochromatic
#0E072A #210F5F #331794 #451FC9 #6744E2

Accessibility & contrast

On white

12.42
#331794 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.69
#331794 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331794
12.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331794#FFFFFF#000000##FFFFFF
##3317941.0012.421.6912.42
#FFFFFF12.421.0021.001.00
#0000001.6921.001.0021.00
##FFFFFF12.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003897
Deuteranopia (green-blind)
#003092
Tritanopia (blue-blind)
#003F57
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331794;
/* rgb */ color: rgb(51, 23, 148);
/* oklch */ color: oklch(34.7% 0.184 281.2);
Tailwind
colors: {
  custom: {
    50: '#795ab5',
    500: '#331794',
    950: '#000000',
  },
}
SCSS
$custom: #331794;
$custom-light: #795ab5;
$custom-dark: #000000;
JSON
{
  "hex": "#331794",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 148
  },
  "hsl": {
    "h": 253.44,
    "s": 73.099,
    "l": 33.529
  },
  "oklch": {
    "l": 0.34703,
    "c": 0.18391,
    "h": 281.2
  },
  "luminance": 0.03455
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #331794

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

Preview Lab → · Contrast checker → · Palette generator →

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