#331972#331972

#331972 is a dark, vivid violet. Relative luminance 0.026; OKLCH L 31.3% C 0.141 H 288.8°. Best body text is #FFFFFF at 13.79:1 contrast (WCAG AA passes).

Color values

HEX#331972
RGBrgb(51, 25, 114)
HSLhsl(258, 64%, 27%)
HSVhsv(258, 78%, 45%)
CMYKcmyk(55.3%, 78.1%, 0%, 55.3%)
CIE-LABlab(18.43, 35.78, -46.56)
CIE-LCHlch(18.43, 58.72, 307.54°)
OKLaboklab(31.28% 0.0455 -0.1338)
OKLCHoklch(31.28% 0.141 288.8)
XYZxyz(4.7492, 2.6137, 16.1706)
Luminance0.0261 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331972 #587219
analogous
#192C72 #331972 #601972
triadic
#331972 #723319 #197233
tetradic
#331972 #72192C #587219 #197260
square
#331972 #72192C #587219 #197260
split-complementary
#331972 #726019 #2C7219
monochromatic
#0B0619 #1D0E40 #331972 #4924A4 #6233D2

Accessibility & contrast

On white

13.79
#331972 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.52
#331972 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331972
13.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331972#FFFFFF#000000##FFFFFF
##3319721.0013.791.5213.79
#FFFFFF13.791.0021.001.00
#0000001.5221.001.0021.00
##FFFFFF13.791.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #331972;
/* rgb */ color: rgb(51, 25, 114);
/* oklch */ color: oklch(31.3% 0.141 288.8);
Tailwind
colors: {
  custom: {
    50: '#72599b',
    500: '#331972',
    950: '#000000',
  },
}
SCSS
$custom: #331972;
$custom-light: #72599b;
$custom-dark: #000000;
JSON
{
  "hex": "#331972",
  "rgb": {
    "r": 51,
    "g": 25,
    "b": 114
  },
  "hsl": {
    "h": 257.528,
    "s": 64.029,
    "l": 27.255
  },
  "oklch": {
    "l": 0.31275,
    "c": 0.14137,
    "h": 288.8
  },
  "luminance": 0.02614
}

Semantic roles & 50–950 ramp

primary
#331972
secondary
#89A740
accent
#E741B6
background
#F7F5F9
surface
#EDE9F2
border
#C8C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #331972

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

Preview Lab → · Contrast checker → · Palette generator →

#331972 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva