#331A54#331A54

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

Color values

HEX#331A54
RGBrgb(51, 26, 84)
HSLhsl(266, 53%, 22%)
HSVhsv(266, 69%, 33%)
CMYKcmyk(39.3%, 69%, 0%, 67.1%)
CIE-LABlab(15.92, 26.12, -30.82)
CIE-LCHlch(15.92, 40.40, 310.27°)
OKLaboklab(28.64% 0.0503 -0.0876)
OKLCHoklch(28.64% 0.101 299.8)
XYZxyz(3.3345, 2.0827, 8.6121)
Luminance0.0208 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A54 #3B541A
analogous
#1A1E54 #331A54 #501A54
triadic
#331A54 #54331A #1A5433
tetradic
#331A54 #541A1E #3B541A #1A5450
square
#331A54 #541A1E #3B541A #1A5450
split-complementary
#331A54 #54501A #1E541A
monochromatic
#0E0717 #170C25 #331A54 #4F2883 #6C37B1

Accessibility & contrast

On white

14.82
#331A54 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331A54
14.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A54#FFFFFF#000000##FFFFFF
##331A541.0014.821.4214.82
#FFFFFF14.821.0021.001.00
#0000001.4221.001.0021.00
##FFFFFF14.821.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331a54;
/* rgb */ color: rgb(51, 26, 84);
/* oklch */ color: oklch(28.6% 0.101 299.8);
Tailwind
colors: {
  custom: {
    50: '#6e5885',
    500: '#331a54',
    950: '#000000',
  },
}
SCSS
$custom: #331a54;
$custom-light: #6e5885;
$custom-dark: #000000;
JSON
{
  "hex": "#331a54",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 84
  },
  "hsl": {
    "h": 265.862,
    "s": 52.727,
    "l": 21.569
  },
  "oklch": {
    "l": 0.28642,
    "c": 0.10105,
    "h": 299.8
  },
  "luminance": 0.02083
}

Semantic roles & 50–950 ramp

primary
#331A54
secondary
#6A8A40
accent
#DC4C9E
background
#F6F5F8
surface
#ECE9EF
border
#C7C5CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331A54

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

Preview Lab → · Contrast checker → · Palette generator →

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