#331B57#331B57

#331B57 is a dark, moderate violet. Relative luminance 0.022; OKLCH L 29.1% C 0.104 H 298.1°. Best body text is #FFFFFF at 14.63:1 contrast (WCAG AA passes).

Color values

HEX#331B57
RGBrgb(51, 27, 87)
HSLhsl(264, 53%, 22%)
HSVhsv(264, 69%, 34%)
CMYKcmyk(41.4%, 69%, 0%, 65.9%)
CIE-LABlab(16.38, 26.40, -32.09)
CIE-LCHlch(16.38, 41.55, 309.44°)
OKLaboklab(29.06% 0.0487 -0.0914)
OKLCHoklch(29.06% 0.104 298.1)
XYZxyz(3.4770, 2.1757, 9.2517)
Luminance0.0218 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B57 #3F571B
analogous
#1B2157 #331B57 #511B57
triadic
#331B57 #57331B #1B5733
tetradic
#331B57 #571B21 #3F571B #1B5751
square
#331B57 #571B21 #3F571B #1B5751
split-complementary
#331B57 #57511B #21571B
monochromatic
#0E0717 #180D28 #331B57 #4E2986 #6A38B4

Accessibility & contrast

On white

14.63
#331B57 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.44
#331B57 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B57
14.63:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B57#FFFFFF#000000##FFFFFF
##331B571.0014.631.4414.63
#FFFFFF14.631.0021.001.00
#0000001.4421.001.0021.00
##FFFFFF14.631.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002959
Deuteranopia (green-blind)
#002856
Tritanopia (blue-blind)
#2B2836
Achromatopsia (no color)
#292929

Design tokens & code

CSS
--color: #331b57;
/* rgb */ color: rgb(51, 27, 87);
/* oklch */ color: oklch(29.1% 0.104 298.1);
Tailwind
colors: {
  custom: {
    50: '#6e5987',
    500: '#331b57',
    950: '#000000',
  },
}
SCSS
$custom: #331b57;
$custom-light: #6e5987;
$custom-dark: #000000;
JSON
{
  "hex": "#331b57",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 87
  },
  "hsl": {
    "h": 264,
    "s": 52.632,
    "l": 22.353
  },
  "oklch": {
    "l": 0.29058,
    "c": 0.10354,
    "h": 298.1
  },
  "luminance": 0.02176
}

Semantic roles & 50–950 ramp

primary
#331B57
secondary
#6E8D41
accent
#DC4CA2
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331B57

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

Preview Lab → · Contrast checker → · Palette generator →

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