#40216F#40216F

#40216F is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.6% C 0.128 H 297.2°. Best body text is #FFFFFF at 12.61:1 contrast (WCAG AA passes).

Color values

HEX#40216F
RGBrgb(64, 33, 111)
HSLhsl(264, 54%, 28%)
HSVhsv(264, 70%, 44%)
CMYKcmyk(42.3%, 70.3%, 0%, 56.5%)
CIE-LABlab(21.30, 32.92, -39.86)
CIE-LCHlch(21.30, 51.70, 309.56°)
OKLaboklab(33.6% 0.0586 -0.1137)
OKLCHoklch(33.6% 0.128 297.2)
XYZxyz(5.5267, 3.3253, 15.3865)
Luminance0.0333 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40216F #506F21
analogous
#21296F #40216F #67216F
triadic
#40216F #6F4021 #216F40
tetradic
#40216F #6F2129 #506F21 #216F67
square
#40216F #6F2129 #506F21 #216F67
split-complementary
#40216F #6F6721 #296F21
monochromatic
#0E0718 #251340 #40216F #5B2F9E #7843C7

Accessibility & contrast

On white

12.61
#40216F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.67
#40216F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40216F
12.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40216F#FFFFFF#000000##FFFFFF
##40216F1.0012.611.6712.61
#FFFFFF12.611.0021.001.00
#0000001.6721.001.0021.00
##FFFFFF12.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#003371
Deuteranopia (green-blind)
#00326D
Tritanopia (blue-blind)
#343345
Achromatopsia (no color)
#333333

Design tokens & code

CSS
--color: #40216f;
/* rgb */ color: rgb(64, 33, 111);
/* oklch */ color: oklch(33.6% 0.128 297.2);
Tailwind
colors: {
  custom: {
    50: '#795f99',
    500: '#40216f',
    950: '#000000',
  },
}
SCSS
$custom: #40216f;
$custom-light: #795f99;
$custom-dark: #000000;
JSON
{
  "hex": "#40216f",
  "rgb": {
    "r": 64,
    "g": 33,
    "b": 111
  },
  "hsl": {
    "h": 263.846,
    "s": 54.167,
    "l": 28.235
  },
  "oklch": {
    "l": 0.33596,
    "c": 0.12793,
    "h": 297.2
  },
  "luminance": 0.03325
}

Semantic roles & 50–950 ramp

primary
#40216F
secondary
#7FA349
accent
#DE4AA3
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #40216F

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

Preview Lab → · Contrast checker → · Palette generator →

#40216F Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva