#331A4D#331A4D

#331A4D is a dark, moderate violet. Relative luminance 0.020; OKLCH L 28.1% C 0.092 H 303.6°. Best body text is #FFFFFF at 15.05:1 contrast (WCAG AA passes).

Color values

HEX#331A4D
RGBrgb(51, 26, 77)
HSLhsl(269, 50%, 20%)
HSVhsv(269, 66%, 30%)
CMYKcmyk(33.8%, 66.2%, 0%, 69.8%)
CIE-LABlab(15.37, 24.07, -26.93)
CIE-LCHlch(15.37, 36.12, 311.79°)
OKLaboklab(28.08% 0.0507 -0.0762)
OKLCHoklch(28.08% 0.092 303.6)
XYZxyz(3.0739, 1.9784, 7.2397)
Luminance0.0198 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A4D #344D1A
analogous
#1A1A4D #331A4D #4D1A4D
triadic
#331A4D #4D331A #1A4D33
tetradic
#331A4D #4D1A1A #344D1A #1A4D4D
square
#331A4D #4D1A1A #344D1A #1A4D4D
split-complementary
#331A4D #4D4D1A #1A4D1A
monochromatic
#0F0817 #150B1F #331A4D #51297B #7039A9

Accessibility & contrast

On white

15.05
#331A4D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.40
#331A4D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A4D
15.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A4D#FFFFFF#000000##FFFFFF
##331A4D1.0015.051.4015.05
#FFFFFF15.051.0021.001.00
#0000001.4021.001.0021.00
##FFFFFF15.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#02264F
Deuteranopia (green-blind)
#0D264C
Tritanopia (blue-blind)
#2E2430
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331a4d;
/* rgb */ color: rgb(51, 26, 77);
/* oklch */ color: oklch(28.1% 0.092 303.6);
Tailwind
colors: {
  custom: {
    50: '#6d587f',
    500: '#331a4d',
    950: '#000000',
  },
}
SCSS
$custom: #331a4d;
$custom-light: #6d587f;
$custom-dark: #000000;
JSON
{
  "hex": "#331a4d",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 77
  },
  "hsl": {
    "h": 269.412,
    "s": 49.515,
    "l": 20.196
  },
  "oklch": {
    "l": 0.28076,
    "c": 0.09153,
    "h": 303.6
  },
  "luminance": 0.01978
}

Semantic roles & 50–950 ramp

primary
#331A4D
secondary
#628340
accent
#D94F95
background
#F6F5F7
surface
#ECE9EE
border
#C7C5C9
text
#07030A
muted
#7A787C

Preview Lab

Preview with #331A4D

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

Preview Lab → · Contrast checker → · Palette generator →

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