#331B51#331B51

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

Color values

HEX#331B51
RGBrgb(51, 27, 81)
HSLhsl(267, 50%, 21%)
HSVhsv(267, 67%, 32%)
CMYKcmyk(37%, 66.7%, 0%, 68.2%)
CIE-LABlab(15.91, 24.61, -28.80)
CIE-LCHlch(15.91, 37.88, 310.52°)
OKLaboklab(28.56% 0.0491 -0.0817)
OKLCHoklch(28.56% 0.095 301)
XYZxyz(3.2420, 2.0817, 8.0140)
Luminance0.0208 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B51 #39511B
analogous
#1B1E51 #331B51 #4E1B51
triadic
#331B51 #51331B #1B5133
tetradic
#331B51 #511B1E #39511B #1B514E
square
#331B51 #511B1E #39511B #1B514E
split-complementary
#331B51 #514E1B #1E511B
monochromatic
#0E0817 #160C23 #331B51 #502A7F #6D3AAD

Accessibility & contrast

On white

14.83
#331B51 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331B51
14.83:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B51#FFFFFF#000000##FFFFFF
##331B511.0014.831.4214.83
#FFFFFF14.831.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.831.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002753
Deuteranopia (green-blind)
#092750
Tritanopia (blue-blind)
#2D2633
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331b51;
/* rgb */ color: rgb(51, 27, 81);
/* oklch */ color: oklch(28.6% 0.095 301.0);
Tailwind
colors: {
  custom: {
    50: '#6d5982',
    500: '#331b51',
    950: '#000000',
  },
}
SCSS
$custom: #331b51;
$custom-light: #6d5982;
$custom-dark: #000000;
JSON
{
  "hex": "#331b51",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 81
  },
  "hsl": {
    "h": 266.667,
    "s": 50,
    "l": 21.176
  },
  "oklch": {
    "l": 0.28564,
    "c": 0.09532,
    "h": 301
  },
  "luminance": 0.02082
}

Semantic roles & 50–950 ramp

primary
#331B51
secondary
#688741
accent
#DA4E9C
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331B51

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

Preview Lab → · Contrast checker → · Palette generator →

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