#40206F#40206F

#40206F is a dark, vivid violet. Relative luminance 0.033; OKLCH L 33.4% C 0.129 H 297.5°. Best body text is #FFFFFF at 12.69:1 contrast (WCAG AA passes).

Color values

HEX#40206F
RGBrgb(64, 32, 111)
HSLhsl(264, 55%, 28%)
HSVhsv(264, 71%, 44%)
CMYKcmyk(42.3%, 71.2%, 0%, 56.5%)
CIE-LABlab(21.10, 33.49, -40.19)
CIE-LCHlch(21.10, 52.32, 309.80°)
OKLaboklab(33.45% 0.0597 -0.1147)
OKLCHoklch(33.45% 0.129 297.5)
XYZxyz(5.4994, 3.2706, 15.3774)
Luminance0.0327 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40206F #4F6F20
analogous
#20276F #40206F #67206F
triadic
#40206F #6F4020 #206F40
tetradic
#40206F #6F2027 #4F6F20 #206F67
square
#40206F #6F2027 #4F6F20 #206F67
split-complementary
#40206F #6F6720 #276F20
monochromatic
#0E0718 #25123F #40206F #5B2E9F #7841C8

Accessibility & contrast

On white

12.69
#40206F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.65
#40206F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40206F
12.69:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40206F#FFFFFF#000000##FFFFFF
##40206F1.0012.691.6512.69
#FFFFFF12.691.0021.001.00
#0000001.6521.001.0021.00
##FFFFFF12.691.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #40206f;
/* rgb */ color: rgb(64, 32, 111);
/* oklch */ color: oklch(33.4% 0.129 297.5);
Tailwind
colors: {
  custom: {
    50: '#795e99',
    500: '#40206f',
    950: '#000000',
  },
}
SCSS
$custom: #40206f;
$custom-light: #795e99;
$custom-dark: #000000;
JSON
{
  "hex": "#40206f",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 111
  },
  "hsl": {
    "h": 264.304,
    "s": 55.245,
    "l": 28.039
  },
  "oklch": {
    "l": 0.33449,
    "c": 0.12933,
    "h": 297.5
  },
  "luminance": 0.03271
}

Semantic roles & 50–950 ramp

primary
#40206F
secondary
#7EA348
accent
#DF49A2
background
#F7F5F9
surface
#EEE9F2
border
#C9C5CC
text
#09040E
muted
#7B797E

Preview Lab

Preview with #40206F

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

Preview Lab → · Contrast checker → · Palette generator →

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