#40407E#40407E

#40407E is a dark, moderate blue. Relative luminance 0.063; OKLCH L 40.4% C 0.102 H 280.8°. Best body text is #FFFFFF at 9.32:1 contrast (WCAG AA passes).

Color values

HEX#40407E
RGBrgb(64, 64, 126)
HSLhsl(240, 33%, 37%)
HSVhsv(240, 49%, 49%)
CMYKcmyk(49.2%, 49.2%, 0%, 50.6%)
CIE-LABlab(30.07, 17.91, -35.27)
CIE-LCHlch(30.07, 39.56, 296.91°)
OKLaboklab(40.41% 0.0192 -0.1002)
OKLCHoklch(40.41% 0.102 280.8)
XYZxyz(7.7125, 6.2627, 20.5371)
Luminance0.0626 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40407E #7E7E40
analogous
#405F7E #40407E #5F407E
triadic
#40407E #7E4040 #407E40
tetradic
#40407E #7E405F #7E7E40 #407E5F
square
#40407E #7E405F #7E7E40 #407E5F
split-complementary
#40407E #7E5F40 #5F7E40
monochromatic
#17172D #2B2B55 #40407E #5555A7 #7C7CBC

Accessibility & contrast

On white

9.32
#40407E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.25
#40407E on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40407E
9.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40407E#FFFFFF#000000##FFFFFF
##40407E1.009.322.259.32
#FFFFFF9.321.0021.001.00
#0000002.2521.001.0021.00
##FFFFFF9.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#264980
Deuteranopia (green-blind)
#21457D
Tritanopia (blue-blind)
#2A4D59
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #40407e;
/* rgb */ color: rgb(64, 64, 126);
/* oklch */ color: oklch(40.4% 0.102 280.8);
Tailwind
colors: {
  custom: {
    50: '#7974a4',
    500: '#40407e',
    950: '#000000',
  },
}
SCSS
$custom: #40407e;
$custom-light: #7974a4;
$custom-dark: #000000;
JSON
{
  "hex": "#40407e",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 126
  },
  "hsl": {
    "h": 240,
    "s": 32.632,
    "l": 37.255
  },
  "oklch": {
    "l": 0.40413,
    "c": 0.10201,
    "h": 280.8
  },
  "luminance": 0.06263
}

Semantic roles & 50–950 ramp

primary
#40407E
secondary
#A7A773
accent
#C95FC9
background
#F7F7FA
surface
#EEEDF4
border
#C9C8CE
text
#09080F
muted
#7B7B7F

Preview Lab

Preview with #40407E

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

Preview Lab → · Contrast checker → · Palette generator →

#40407E Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva