#331B48#331B48

#331B48 is a dark, moderate violet. Relative luminance 0.020; OKLCH L 27.9% C 0.083 H 306.4°. Best body text is #FFFFFF at 15.09:1 contrast (WCAG AA passes).

Color values

HEX#331B48
RGBrgb(51, 27, 72)
HSLhsl(272, 45%, 19%)
HSVhsv(272, 63%, 28%)
CMYKcmyk(29.2%, 62.5%, 0%, 71.8%)
CIE-LABlab(15.25, 22.01, -23.69)
CIE-LCHlch(15.25, 32.33, 312.89°)
OKLaboklab(27.87% 0.0492 -0.0667)
OKLCHoklch(27.87% 0.083 306.4)
XYZxyz(2.9266, 1.9556, 6.3529)
Luminance0.0196 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B48 #30481B
analogous
#1D1B48 #331B48 #481B47
triadic
#331B48 #48331B #1B4833
tetradic
#331B48 #481D1B #30481B #1B4748
square
#331B48 #481D1B #30481B #1B4748
split-complementary
#331B48 #47481B #1B481D
monochromatic
#100816 #130A1B #331B48 #532C75 #723CA1

Accessibility & contrast

On white

15.09
#331B48 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.39
#331B48 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B48
15.09:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B48#FFFFFF#000000##FFFFFF
##331B481.0015.091.3915.09
#FFFFFF15.091.0021.001.00
#0000001.3921.001.0021.00
##FFFFFF15.091.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0B2549
Deuteranopia (green-blind)
#142647
Tritanopia (blue-blind)
#30232E
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331b48;
/* rgb */ color: rgb(51, 27, 72);
/* oklch */ color: oklch(27.9% 0.083 306.4);
Tailwind
colors: {
  custom: {
    50: '#6c587b',
    500: '#331b48',
    950: '#000000',
  },
}
SCSS
$custom: #331b48;
$custom-light: #6c587b;
$custom-dark: #000000;
JSON
{
  "hex": "#331b48",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 72
  },
  "hsl": {
    "h": 272,
    "s": 45.455,
    "l": 19.412
  },
  "oklch": {
    "l": 0.27872,
    "c": 0.08286,
    "h": 306.4
  },
  "luminance": 0.01956
}

Semantic roles & 50–950 ramp

primary
#331B48
secondary
#5D7E41
accent
#D55390
background
#F6F5F7
surface
#EBE9EE
border
#C6C5C9
text
#070309
muted
#7A787B

Preview Lab

Preview with #331B48

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

Preview Lab → · Contrast checker → · Palette generator →

#331B48 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva