#331795#331795

#331795 is a dark, vivid violet. Relative luminance 0.035; OKLCH L 34.8% C 0.185 H 281.0°. Best body text is #FFFFFF at 12.37:1 contrast (WCAG AA passes).

Color values

HEX#331795
RGBrgb(51, 23, 149)
HSLhsl(253, 73%, 34%)
HSVhsv(253, 85%, 58%)
CMYKcmyk(65.8%, 84.6%, 0%, 41.6%)
CIE-LABlab(21.89, 47.19, -62.94)
CIE-LCHlch(21.89, 78.67, 306.86°)
OKLaboklab(34.82% 0.0355 -0.1816)
OKLCHoklch(34.82% 0.185 281)
XYZxyz(7.0947, 3.4860, 28.7269)
Luminance0.0349 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331795 #799517
analogous
#173A95 #331795 #721795
triadic
#331795 #953317 #179533
tetradic
#331795 #95173A #799517 #179572
square
#331795 #95173A #799517 #179572
split-complementary
#331795 #957217 #3A9517
monochromatic
#0F072B #210F60 #331795 #451FCA #6744E2

Accessibility & contrast

On white

12.37
#331795 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.70
#331795 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331795
12.37:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331795#FFFFFF#000000##FFFFFF
##3317951.0012.371.7012.37
#FFFFFF12.371.0021.001.00
#0000001.7021.001.0021.00
##FFFFFF12.371.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003998
Deuteranopia (green-blind)
#003093
Tritanopia (blue-blind)
#003F58
Achromatopsia (no color)
#343434

Design tokens & code

CSS
--color: #331795;
/* rgb */ color: rgb(51, 23, 149);
/* oklch */ color: oklch(34.8% 0.185 281.0);
Tailwind
colors: {
  custom: {
    50: '#795ab5',
    500: '#331795',
    950: '#000000',
  },
}
SCSS
$custom: #331795;
$custom-light: #795ab5;
$custom-dark: #000000;
JSON
{
  "hex": "#331795",
  "rgb": {
    "r": 51,
    "g": 23,
    "b": 149
  },
  "hsl": {
    "h": 253.333,
    "s": 73.256,
    "l": 33.725
  },
  "oklch": {
    "l": 0.34816,
    "c": 0.18506,
    "h": 281
  },
  "luminance": 0.03487
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #331795

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

Preview Lab → · Contrast checker → · Palette generator →

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