#331252#331252

#331252 is a dark, moderate violet. Relative luminance 0.017; OKLCH L 27.3% C 0.110 H 303.3°. Best body text is #FFFFFF at 15.56:1 contrast (WCAG AA passes).

Color values

HEX#331252
RGBrgb(51, 18, 82)
HSLhsl(271, 64%, 20%)
HSVhsv(271, 78%, 32%)
CMYKcmyk(37.8%, 78%, 0%, 67.8%)
CIE-LABlab(14.09, 30.12, -32.42)
CIE-LCHlch(14.09, 44.25, 312.89°)
OKLaboklab(27.28% 0.0606 -0.0923)
OKLCHoklch(27.28% 0.11 303.3)
XYZxyz(3.1042, 1.7456, 8.1544)
Luminance0.0175 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331252 #315212
analogous
#131252 #331252 #521251
triadic
#331252 #523312 #125233
tetradic
#331252 #521312 #315212 #125152
square
#331252 #521312 #315212 #125152
split-complementary
#331252 #515212 #125213
monochromatic
#100619 #140720 #331252 #521D84 #7128B6

Accessibility & contrast

On white

15.56
#331252 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.35
#331252 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331252
15.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331252#FFFFFF#000000##FFFFFF
##3312521.0015.561.3515.56
#FFFFFF15.561.0021.001.00
#0000001.3521.001.0021.00
##FFFFFF15.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002354
Deuteranopia (green-blind)
#002451
Tritanopia (blue-blind)
#2D2130
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #331252;
/* rgb */ color: rgb(51, 18, 82);
/* oklch */ color: oklch(27.3% 0.110 303.3);
Tailwind
colors: {
  custom: {
    50: '#6e5383',
    500: '#331252',
    950: '#000000',
  },
}
SCSS
$custom: #331252;
$custom-light: #6e5383;
$custom-dark: #000000;
JSON
{
  "hex": "#331252",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 82
  },
  "hsl": {
    "h": 270.938,
    "s": 64,
    "l": 19.608
  },
  "oklch": {
    "l": 0.27282,
    "c": 0.1104,
    "h": 303.3
  },
  "luminance": 0.01746
}

Semantic roles & 50–950 ramp

primary
#331252
secondary
#5F8B35
accent
#E74191
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#07020B
muted
#7A787C

Preview Lab

Preview with #331252

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

Preview Lab → · Contrast checker → · Palette generator →

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