#331255#331255

#331255 is a dark, moderate violet. Relative luminance 0.018; OKLCH L 27.6% C 0.114 H 301.7°. Best body text is #FFFFFF at 15.46:1 contrast (WCAG AA passes).

Color values

HEX#331255
RGBrgb(51, 18, 85)
HSLhsl(270, 65%, 20%)
HSVhsv(270, 79%, 33%)
CMYKcmyk(40%, 78.8%, 0%, 66.7%)
CIE-LABlab(14.36, 30.95, -34.03)
CIE-LCHlch(14.36, 46.00, 312.29°)
OKLaboklab(27.55% 0.0599 -0.097)
OKLCHoklch(27.55% 0.114 301.7)
XYZxyz(3.2208, 1.7923, 8.7688)
Luminance0.0179 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331255 #345512
analogous
#121255 #331255 #541255
triadic
#331255 #553312 #125533
tetradic
#331255 #551212 #345512 #125554
square
#331255 #551212 #345512 #125554
split-complementary
#331255 #555412 #125512
monochromatic
#0F0519 #150722 #331255 #511D88 #7027BA

Accessibility & contrast

On white

15.46
#331255 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331255
15.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331255#FFFFFF#000000##FFFFFF
##3312551.0015.461.3615.46
#FFFFFF15.461.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002457
Deuteranopia (green-blind)
#002454
Tritanopia (blue-blind)
#2C2332
Achromatopsia (no color)
#242424

Design tokens & code

CSS
--color: #331255;
/* rgb */ color: rgb(51, 18, 85);
/* oklch */ color: oklch(27.6% 0.114 301.7);
Tailwind
colors: {
  custom: {
    50: '#6f5385',
    500: '#331255',
    950: '#000000',
  },
}
SCSS
$custom: #331255;
$custom-light: #6f5385;
$custom-dark: #000000;
JSON
{
  "hex": "#331255",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 85
  },
  "hsl": {
    "h": 269.552,
    "s": 65.049,
    "l": 20.196
  },
  "oklch": {
    "l": 0.27553,
    "c": 0.11404,
    "h": 301.7
  },
  "luminance": 0.01792
}

Semantic roles & 50–950 ramp

primary
#331255
secondary
#628E35
accent
#E84095
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08030B
muted
#7B787C

Preview Lab

Preview with #331255

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

Preview Lab → · Contrast checker → · Palette generator →

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