#331254#331254

#331254 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.5% C 0.113 H 302.2°. Best body text is #FFFFFF at 15.49:1 contrast (WCAG AA passes).

Color values

HEX#331254
RGBrgb(51, 18, 84)
HSLhsl(270, 65%, 20%)
HSVhsv(270, 79%, 33%)
CMYKcmyk(39.3%, 78.6%, 0%, 67.1%)
CIE-LABlab(14.27, 30.67, -33.50)
CIE-LCHlch(14.27, 45.42, 312.48°)
OKLaboklab(27.46% 0.0601 -0.0955)
OKLCHoklch(27.46% 0.113 302.2)
XYZxyz(3.1814, 1.7765, 8.5611)
Luminance0.0178 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331254 #335412
analogous
#121254 #331254 #541254
triadic
#331254 #543312 #125433
tetradic
#331254 #541212 #335412 #125454
square
#331254 #541212 #335412 #125454
split-complementary
#331254 #545412 #125412
monochromatic
#0F0519 #140722 #331254 #521D86 #7028B9

Accessibility & contrast

On white

15.49
#331254 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.36
#331254 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331254
15.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331254#FFFFFF#000000##FFFFFF
##3312541.0015.491.3615.49
#FFFFFF15.491.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002456
Deuteranopia (green-blind)
#002453
Tritanopia (blue-blind)
#2C2231
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #331254;
/* rgb */ color: rgb(51, 18, 84);
/* oklch */ color: oklch(27.5% 0.113 302.2);
Tailwind
colors: {
  custom: {
    50: '#6e5385',
    500: '#331254',
    950: '#000000',
  },
}
SCSS
$custom: #331254;
$custom-light: #6e5385;
$custom-dark: #000000;
JSON
{
  "hex": "#331254",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 84
  },
  "hsl": {
    "h": 270,
    "s": 64.706,
    "l": 20
  },
  "oklch": {
    "l": 0.27462,
    "c": 0.11282,
    "h": 302.2
  },
  "luminance": 0.01777
}

Semantic roles & 50–950 ramp

primary
#331254
secondary
#618D35
accent
#E84094
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#07030B
muted
#7A787C

Preview Lab

Preview with #331254

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

Preview Lab → · Contrast checker → · Palette generator →

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