#331790#331790

#331790 is a dark, vivid violet. Relative luminance 0.033; OKLCH L 34.3% C 0.179 H 282.0°. Best body text is #FFFFFF at 12.61:1 contrast (WCAG AA passes).

Color values

HEX#331790
RGBrgb(51, 23, 144)
HSLhsl(254, 72%, 33%)
HSVhsv(254, 84%, 56%)
CMYKcmyk(64.6%, 84%, 0%, 43.5%)
CIE-LABlab(21.32, 45.73, -60.79)
CIE-LCHlch(21.32, 76.07, 306.95°)
OKLaboklab(34.25% 0.0372 -0.1754)
OKLCHoklch(34.25% 0.179 282)
XYZxyz(6.7041, 3.3297, 26.6696)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331790 #749017
analogous
#173890 #331790 #6F1790
triadic
#331790 #903317 #179033
tetradic
#331790 #901738 #749017 #17906F
square
#331790 #901738 #749017 #17906F
split-complementary
#331790 #906F17 #389017
monochromatic
#0E0626 #200F5B #331790 #461FC5 #6641E1

Accessibility & contrast

On white

12.61
#331790 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#331790 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331790
12.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331790#FFFFFF#000000##FFFFFF
##3317901.0012.611.6712.61
#FFFFFF12.611.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003793
Deuteranopia (green-blind)
#002F8E
Tritanopia (blue-blind)
#003D55
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #331790;
/* rgb */ color: rgb(51, 23, 144);
/* oklch */ color: oklch(34.3% 0.179 282.0);
Tailwind
colors: {
  custom: {
    50: '#785ab2',
    500: '#331790',
    950: '#000000',
  },
}
SCSS
$custom: #331790;
$custom-light: #785ab2;
$custom-dark: #000000;
JSON
{
  "hex": "#331790",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 144
  },
  "hsl": {
    "h": 253.884,
    "s": 72.455,
    "l": 32.745
  },
  "oklch": {
    "l": 0.34252,
    "c": 0.17928,
    "h": 282
  },
  "luminance": 0.0333
}

Semantic roles & 50–950 ramp

primary
#331790
secondary
#A4C142
accent
#EF39C5
background
#F7F5FB
surface
#EEE9F6
border
#C9C5D0
text
#0A0411
muted
#7C7980

Preview Lab

Preview with #331790

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

Preview Lab → · Contrast checker → · Palette generator →

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