#40207C#40207C

#40207C is a dark, vivid violet. Relative luminance 0.036; OKLCH L 34.6% C 0.146 H 293.2°. Best body text is #FFFFFF at 12.24:1 contrast (WCAG AA passes).

Color values

HEX#40207C
RGBrgb(64, 32, 124)
HSLhsl(261, 59%, 31%)
HSVhsv(261, 74%, 49%)
CMYKcmyk(48.4%, 74.2%, 0%, 51.4%)
CIE-LABlab(22.22, 37.25, -46.69)
CIE-LCHlch(22.22, 59.72, 308.58°)
OKLaboklab(34.6% 0.0572 -0.1338)
OKLCHoklch(34.6% 0.146 293.2)
XYZxyz(6.2679, 3.5780, 19.4253)
Luminance0.0358 (WCAG relative)
Temperaturecool
Familyviolet

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40207C #5C7C20
analogous
#202E7C #40207C #6E207C
triadic
#40207C #7C4020 #207C40
tetradic
#40207C #7C202E #5C7C20 #207C6E
square
#40207C #7C202E #5C7C20 #207C6E
split-complementary
#40207C #7C6E20 #2E7C20
monochromatic
#0E071B #27134B #40207C #592DAD #7647CF

Accessibility & contrast

On white

12.24
#40207C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.72
#40207C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40207C
12.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40207C#FFFFFF#000000##FFFFFF
##40207C1.0012.241.7212.24
#FFFFFF12.241.0021.001.00
#0000001.7221.001.0021.00
##FFFFFF12.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00367F
Deuteranopia (green-blind)
#00337A
Tritanopia (blue-blind)
#2E384C
Achromatopsia (no color)
#353535

Design tokens & code

CSS
--color: #40207c;
/* rgb */ color: rgb(64, 32, 124);
/* oklch */ color: oklch(34.6% 0.146 293.2);
Tailwind
colors: {
  custom: {
    50: '#7b5ea3',
    500: '#40207c',
    950: '#000000',
  },
}
SCSS
$custom: #40207c;
$custom-light: #7b5ea3;
$custom-dark: #000000;
JSON
{
  "hex": "#40207c",
  "rgb": {
    "r": 64,
    "g": 32,
    "b": 124
  },
  "hsl": {
    "h": 260.87,
    "s": 58.974,
    "l": 30.588
  },
  "oklch": {
    "l": 0.34604,
    "c": 0.14552,
    "h": 293.2
  },
  "luminance": 0.03578
}

Semantic roles & 50–950 ramp

primary
#40207C
secondary
#8BAF49
accent
#E246AC
background
#F7F5FA
surface
#EEE9F4
border
#C9C5CE
text
#0A050F
muted
#7C797F

Preview Lab

Preview with #40207C

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

Preview Lab → · Contrast checker → · Palette generator →

#40207C Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva