#331256#331256

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

Color values

HEX#331256
RGBrgb(51, 18, 86)
HSLhsl(269, 65%, 20%)
HSVhsv(269, 79%, 34%)
CMYKcmyk(40.7%, 79.1%, 0%, 66.3%)
CIE-LABlab(14.45, 31.23, -34.56)
CIE-LCHlch(14.45, 46.58, 312.10°)
OKLaboklab(27.64% 0.0597 -0.0986)
OKLCHoklch(27.64% 0.115 301.2)
XYZxyz(3.2609, 1.8083, 8.9795)
Luminance0.0181 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331256 #355612
analogous
#121356 #331256 #551256
triadic
#331256 #563312 #125633
tetradic
#331256 #561213 #355612 #125655
square
#331256 #561213 #355612 #125655
split-complementary
#331256 #565512 #135612
monochromatic
#0F0519 #150723 #331256 #511D89 #6F27BB

Accessibility & contrast

On white

15.42
#331256 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #331256
15.42:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331256#FFFFFF#000000##FFFFFF
##3312561.0015.421.3615.42
#FFFFFF15.421.0021.001.00
#0000001.3621.001.0021.00
##FFFFFF15.421.0021.001.00

Color blindness preview

Protanopia (red-blind)
#002458
Deuteranopia (green-blind)
#002455
Tritanopia (blue-blind)
#2B2333
Achromatopsia (no color)
#252525

Design tokens & code

CSS
--color: #331256;
/* rgb */ color: rgb(51, 18, 86);
/* oklch */ color: oklch(27.6% 0.115 301.2);
Tailwind
colors: {
  custom: {
    50: '#6f5386',
    500: '#331256',
    950: '#000000',
  },
}
SCSS
$custom: #331256;
$custom-light: #6f5386;
$custom-dark: #000000;
JSON
{
  "hex": "#331256",
  "rgb": {
    "r": 51,
    "g": 18,
    "b": 86
  },
  "hsl": {
    "h": 269.118,
    "s": 65.385,
    "l": 20.392
  },
  "oklch": {
    "l": 0.27645,
    "c": 0.11525,
    "h": 301.2
  },
  "luminance": 0.01808
}

Semantic roles & 50–950 ramp

primary
#331256
secondary
#638F35
accent
#E83F96
background
#F6F4F8
surface
#ECE7EF
border
#C7C3CA
text
#08030B
muted
#7B787C

Preview Lab

Preview with #331256

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

Preview Lab → · Contrast checker → · Palette generator →

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