#331B52#331B52

#331B52 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.6% C 0.097 H 300.5°. Best body text is #FFFFFF at 14.79:1 contrast (WCAG AA passes).

Color values

HEX#331B52
RGBrgb(51, 27, 82)
HSLhsl(266, 50%, 21%)
HSVhsv(266, 67%, 32%)
CMYKcmyk(37.8%, 67.1%, 0%, 67.8%)
CIE-LABlab(15.99, 24.91, -29.35)
CIE-LCHlch(15.99, 38.50, 310.31°)
OKLaboklab(28.64% 0.0491 -0.0833)
OKLCHoklch(28.64% 0.097 300.5)
XYZxyz(3.2798, 2.0968, 8.2129)
Luminance0.0210 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B52 #3A521B
analogous
#1B1F52 #331B52 #4F1B52
triadic
#331B52 #52331B #1B5233
tetradic
#331B52 #521B1F #3A521B #1B524F
square
#331B52 #521B1F #3A521B #1B524F
split-complementary
#331B52 #524F1B #1F521B
monochromatic
#0E0817 #160C24 #331B52 #502A80 #6C39AE

Accessibility & contrast

On white

14.79
#331B52 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.42
#331B52 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B52
14.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B52#FFFFFF#000000##FFFFFF
##331B521.0014.791.4214.79
#FFFFFF14.791.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.791.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002854
Deuteranopia (green-blind)
#082751
Tritanopia (blue-blind)
#2C2733
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331b52;
/* rgb */ color: rgb(51, 27, 82);
/* oklch */ color: oklch(28.6% 0.097 300.5);
Tailwind
colors: {
  custom: {
    50: '#6d5983',
    500: '#331b52',
    950: '#000000',
  },
}
SCSS
$custom: #331b52;
$custom-light: #6d5983;
$custom-dark: #000000;
JSON
{
  "hex": "#331b52",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 82
  },
  "hsl": {
    "h": 266.182,
    "s": 50.459,
    "l": 21.373
  },
  "oklch": {
    "l": 0.28644,
    "c": 0.0967,
    "h": 300.5
  },
  "luminance": 0.02097
}

Semantic roles & 50–950 ramp

primary
#331B52
secondary
#698841
accent
#DA4E9D
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331B52

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

Preview Lab → · Contrast checker → · Palette generator →

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