#331548#331548

#331548 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 26.9% C 0.093 H 308.4°. Best body text is #FFFFFF at 15.65:1 contrast (WCAG AA passes).

Color values

HEX#331548
RGBrgb(51, 21, 72)
HSLhsl(275, 55%, 18%)
HSVhsv(275, 71%, 28%)
CMYKcmyk(29.2%, 70.8%, 0%, 71.8%)
CIE-LABlab(13.87, 25.71, -25.90)
CIE-LCHlch(13.87, 36.49, 314.79°)
OKLaboklab(26.87% 0.0581 -0.0732)
OKLCHoklch(26.87% 0.093 308.4)
XYZxyz(2.8029, 1.7081, 6.3117)
Luminance0.0171 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331548 #2A4815
analogous
#191548 #331548 #481543
triadic
#331548 #483315 #154833
tetradic
#331548 #481915 #2A4815 #154348
square
#331548 #481915 #2A4815 #154348
split-complementary
#331548 #434815 #154819
monochromatic
#110718 #110719 #331548 #552377 #7631A7

Accessibility & contrast

On white

15.65
#331548 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.34
#331548 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331548
15.65:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331548#FFFFFF#000000##FFFFFF
##3315481.0015.651.3415.65
#FFFFFF15.651.0021.001.00
#0000001.3421.001.0021.00
##FFFFFF15.651.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00224A
Deuteranopia (green-blind)
#0C2447
Tritanopia (blue-blind)
#301F2C
Achromatopsia (no color)
#232323

Design tokens & code

CSS
--color: #331548;
/* rgb */ color: rgb(51, 21, 72);
/* oklch */ color: oklch(26.9% 0.093 308.4);
Tailwind
colors: {
  custom: {
    50: '#6d547b',
    500: '#331548',
    950: '#000000',
  },
}
SCSS
$custom: #331548;
$custom-light: #6d547b;
$custom-dark: #000000;
JSON
{
  "hex": "#331548",
  "rgb": {
    "r": 51,
    "g": 21,
    "b": 72
  },
  "hsl": {
    "h": 275.294,
    "s": 54.839,
    "l": 18.235
  },
  "oklch": {
    "l": 0.26867,
    "c": 0.0934,
    "h": 308.4
  },
  "luminance": 0.01708
}

Semantic roles & 50–950 ramp

primary
#331548
secondary
#568039
accent
#DE4A87
background
#F6F4F7
surface
#ECE8EE
border
#C7C4C9
text
#070309
muted
#7A787B

Preview Lab

Preview with #331548

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

Preview Lab → · Contrast checker → · Palette generator →

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