#331A72#331A72

#331A72 is a dark, vivid violet. Relative luminance 0.027; OKLCH L 31.4% C 0.140 H 288.6°. Best body text is #FFFFFF at 13.71:1 contrast (WCAG AA passes).

Color values

HEX#331A72
RGBrgb(51, 26, 114)
HSLhsl(257, 63%, 27%)
HSVhsv(257, 77%, 45%)
CMYKcmyk(55.3%, 77.2%, 0%, 55.3%)
CIE-LABlab(18.62, 35.24, -46.25)
CIE-LCHlch(18.62, 58.14, 307.30°)
OKLaboklab(31.41% 0.0446 -0.133)
OKLCHoklch(31.41% 0.14 288.6)
XYZxyz(4.7710, 2.6573, 16.1778)
Luminance0.0266 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331A72 #59721A
analogous
#1A2D72 #331A72 #5F1A72
triadic
#331A72 #72331A #1A7233
tetradic
#331A72 #721A2D #59721A #1A725F
square
#331A72 #721A2D #59721A #1A725F
split-complementary
#331A72 #725F1A #2D721A
monochromatic
#0B0619 #1D0F40 #331A72 #4925A4 #6235D1

Accessibility & contrast

On white

13.71
#331A72 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.53
#331A72 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331A72
13.71:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331A72#FFFFFF#000000##FFFFFF
##331A721.0013.711.5313.71
#FFFFFF13.711.0021.001.00
#0000001.5321.001.0021.00
##FFFFFF13.711.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002F75
Deuteranopia (green-blind)
#002B70
Tritanopia (blue-blind)
#1B3244
Achromatopsia (no color)
#2D2D2D

Design tokens & code

CSS
--color: #331a72;
/* rgb */ color: rgb(51, 26, 114);
/* oklch */ color: oklch(31.4% 0.140 288.6);
Tailwind
colors: {
  custom: {
    50: '#72599b',
    500: '#331a72',
    950: '#000000',
  },
}
SCSS
$custom: #331a72;
$custom-light: #72599b;
$custom-dark: #000000;
JSON
{
  "hex": "#331a72",
  "rgb": {
    "r": 51,
    "g": 26,
    "b": 114
  },
  "hsl": {
    "h": 257.045,
    "s": 62.857,
    "l": 27.451
  },
  "oklch": {
    "l": 0.31409,
    "c": 0.14024,
    "h": 288.6
  },
  "luminance": 0.02658
}

Semantic roles & 50–950 ramp

primary
#331A72
secondary
#8AA741
accent
#E642B7
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331A72

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

Preview Lab → · Contrast checker → · Palette generator →

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