#331581#331581

#331581 is a dark, vivid violet. Relative luminance 0.028; OKLCH L 32.4% C 0.163 H 285.5°. Best body text is #FFFFFF at 13.42:1 contrast (WCAG AA passes).

Color values

HEX#331581
RGBrgb(51, 21, 129)
HSLhsl(257, 72%, 29%)
HSVhsv(257, 84%, 51%)
CMYKcmyk(60.5%, 83.7%, 0%, 49.4%)
CIE-LABlab(19.33, 42.22, -54.67)
CIE-LCHlch(19.33, 69.08, 307.68°)
OKLaboklab(32.38% 0.0436 -0.1575)
OKLCHoklch(32.38% 0.163 285.5)
XYZxyz(5.5947, 2.8248, 21.0151)
Luminance0.0283 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331581 #638115
analogous
#152D81 #331581 #691581
triadic
#331581 #813315 #158133
tetradic
#331581 #81152D #638115 #158169
square
#331581 #81152D #638115 #158169
split-complementary
#331581 #816915 #2D8115
monochromatic
#0A041A #1E0C4C #331581 #481EB6 #6233DE

Accessibility & contrast

On white

13.42
#331581 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331581
13.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331581#FFFFFF#000000##FFFFFF
##3315811.0013.421.5713.42
#FFFFFF13.421.0021.001.00
#0000001.5721.001.0021.00
##FFFFFF13.421.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331581;
/* rgb */ color: rgb(51, 21, 129);
/* oklch */ color: oklch(32.4% 0.163 285.5);
Tailwind
colors: {
  custom: {
    50: '#7658a7',
    500: '#331581',
    950: '#000000',
  },
}
SCSS
$custom: #331581;
$custom-light: #7658a7;
$custom-dark: #000000;
JSON
{
  "hex": "#331581",
  "rgb": {
    "r": 51,
    "g": 21,
    "b": 129
  },
  "hsl": {
    "h": 256.667,
    "s": 72,
    "l": 29.412
  },
  "oklch": {
    "l": 0.32381,
    "c": 0.16345,
    "h": 285.5
  },
  "luminance": 0.02825
}

Semantic roles & 50–950 ramp

primary
#331581
secondary
#94B63C
accent
#EF39BC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090310
muted
#7B787F

Preview Lab

Preview with #331581

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

Preview Lab → · Contrast checker → · Palette generator →

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