#331B54#331B54

#331B54 is a dark, moderate violet. Relative luminance 0.021; OKLCH L 28.8% C 0.099 H 299.5°. Best body text is #FFFFFF at 14.73:1 contrast (WCAG AA passes).

Color values

HEX#331B54
RGBrgb(51, 27, 84)
HSLhsl(265, 51%, 22%)
HSVhsv(265, 68%, 33%)
CMYKcmyk(39.3%, 67.9%, 0%, 67.1%)
CIE-LABlab(16.14, 25.50, -30.46)
CIE-LCHlch(16.14, 39.72, 309.94°)
OKLaboklab(28.81% 0.0489 -0.0866)
OKLCHoklch(28.81% 0.099 299.5)
XYZxyz(3.3570, 2.1277, 8.6196)
Luminance0.0213 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331B54 #3C541B
analogous
#1B2054 #331B54 #501B54
triadic
#331B54 #54331B #1B5433
tetradic
#331B54 #541B20 #3C541B #1B5450
square
#331B54 #541B20 #3C541B #1B5450
split-complementary
#331B54 #54501B #20541B
monochromatic
#0E0717 #170C26 #331B54 #4F2A82 #6B39B1

Accessibility & contrast

On white

14.73
#331B54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.43
#331B54 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331B54
14.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331B54#FFFFFF#000000##FFFFFF
##331B541.0014.731.4314.73
#FFFFFF14.731.0021.001.00
#0000001.4321.001.0021.00
##FFFFFF14.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002856
Deuteranopia (green-blind)
#052853
Tritanopia (blue-blind)
#2C2734
Achromatopsia (no color)
#282828

Design tokens & code

CSS
--color: #331b54;
/* rgb */ color: rgb(51, 27, 84);
/* oklch */ color: oklch(28.8% 0.099 299.5);
Tailwind
colors: {
  custom: {
    50: '#6e5984',
    500: '#331b54',
    950: '#000000',
  },
}
SCSS
$custom: #331b54;
$custom-light: #6e5984;
$custom-dark: #000000;
JSON
{
  "hex": "#331b54",
  "rgb": {
    "r": 51,
    "g": 27,
    "b": 84
  },
  "hsl": {
    "h": 265.263,
    "s": 51.351,
    "l": 21.765
  },
  "oklch": {
    "l": 0.28808,
    "c": 0.09945,
    "h": 299.5
  },
  "luminance": 0.02128
}

Semantic roles & 50–950 ramp

primary
#331B54
secondary
#6B8A41
accent
#DB4D9F
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331B54

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

Preview Lab → · Contrast checker → · Palette generator →

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