#331C40#331C40

#331C40 is a dark, moderate violet. Relative luminance 0.019; OKLCH L 27.5% C 0.070 H 312.1°. Best body text is #FFFFFF at 15.21:1 contrast (WCAG AA passes).

Color values

HEX#331C40
RGBrgb(51, 28, 64)
HSLhsl(278, 39%, 18%)
HSVhsv(278, 56%, 25%)
CMYKcmyk(20.3%, 56.2%, 0%, 74.9%)
CIE-LABlab(14.98, 19.14, -18.56)
CIE-LCHlch(14.98, 26.67, 315.88°)
OKLaboklab(27.5% 0.0468 -0.0518)
OKLCHoklch(27.5% 0.07 312.1)
XYZxyz(2.7057, 1.9045, 5.0746)
Luminance0.0190 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#331C40 #29401C
analogous
#211C40 #331C40 #401C3B
triadic
#331C40 #40331C #1C4033
tetradic
#331C40 #40211C #29401C #1C3B40
square
#331C40 #40211C #29401C #1C3B40
split-complementary
#331C40 #3B401C #1C4021
monochromatic
#110915 #110915 #331C40 #552F6B #774195

Accessibility & contrast

On white

15.21
#331C40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.38
#331C40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #331C40
15.21:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##331C40#FFFFFF#000000##FFFFFF
##331C401.0015.211.3815.21
#FFFFFF15.211.0021.001.00
#0000001.3821.001.0021.00
##FFFFFF15.211.0021.001.00

Color blindness preview

Protanopia (red-blind)
#142441
Deuteranopia (green-blind)
#1A263F
Tritanopia (blue-blind)
#32222B
Achromatopsia (no color)
#262626

Design tokens & code

CSS
--color: #331c40;
/* rgb */ color: rgb(51, 28, 64);
/* oklch */ color: oklch(27.5% 0.070 312.1);
Tailwind
colors: {
  custom: {
    50: '#6c5975',
    500: '#331c40',
    950: '#000000',
  },
}
SCSS
$custom: #331c40;
$custom-light: #6c5975;
$custom-dark: #000000;
JSON
{
  "hex": "#331c40",
  "rgb": {
    "r": 51,
    "g": 28,
    "b": 64
  },
  "hsl": {
    "h": 278.333,
    "s": 39.13,
    "l": 18.039
  },
  "oklch": {
    "l": 0.27499,
    "c": 0.06977,
    "h": 312.1
  },
  "luminance": 0.01904
}

Semantic roles & 50–950 ramp

primary
#331C40
secondary
#557543
accent
#CF5983
background
#F6F5F7
surface
#EBE9ED
border
#C6C5C8
text
#070308
muted
#7A787B

Preview Lab

Preview with #331C40

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

Preview Lab → · Contrast checker → · Palette generator →

#331C40 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva