#331781#331781

#331781 is a dark, vivid violet. Relative luminance 0.029; OKLCH L 32.6% C 0.162 H 285.2°. Best body text is #FFFFFF at 13.29:1 contrast (WCAG AA passes).

Color values

HEX#331781
RGBrgb(51, 23, 129)
HSLhsl(256, 70%, 30%)
HSVhsv(256, 82%, 51%)
CMYKcmyk(60.5%, 82.2%, 0%, 49.4%)
CIE-LABlab(19.64, 41.30, -54.15)
CIE-LCHlch(19.64, 68.10, 307.33°)
OKLaboklab(32.6% 0.0424 -0.156)
OKLCHoklch(32.6% 0.162 285.2)
XYZxyz(5.6329, 2.9012, 21.0278)
Luminance0.0290 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331781 #658117
analogous
#173081 #331781 #681781
triadic
#331781 #813317 #178133
tetradic
#331781 #811730 #658117 #178168
square
#331781 #811730 #658117 #178168
split-complementary
#331781 #816817 #308117
monochromatic
#0A051A #1E0E4D #331781 #4820B5 #6237DB

Accessibility & contrast

On white

13.29
#331781 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.58
#331781 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331781
13.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331781#FFFFFF#000000##FFFFFF
##3317811.0013.291.5813.29
#FFFFFF13.291.0021.001.00
#0000001.5821.001.0021.00
##FFFFFF13.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003284
Deuteranopia (green-blind)
#002C7F
Tritanopia (blue-blind)
#05374C
Achromatopsia (no color)
#303030

Design tokens & code

CSS
--color: #331781;
/* rgb */ color: rgb(51, 23, 129);
/* oklch */ color: oklch(32.6% 0.162 285.2);
Tailwind
colors: {
  custom: {
    50: '#7559a7',
    500: '#331781',
    950: '#000000',
  },
}
SCSS
$custom: #331781;
$custom-light: #7559a7;
$custom-dark: #000000;
JSON
{
  "hex": "#331781",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 129
  },
  "hsl": {
    "h": 255.849,
    "s": 69.737,
    "l": 29.804
  },
  "oklch": {
    "l": 0.32599,
    "c": 0.16167,
    "h": 285.2
  },
  "luminance": 0.02902
}

Semantic roles & 50–950 ramp

primary
#331781
secondary
#96B53E
accent
#ED3BBE
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#090410
muted
#7B797F

Preview Lab

Preview with #331781

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

Preview Lab → · Contrast checker → · Palette generator →

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