#40407D#40407D

#40407D is a dark, moderate blue. Relative luminance 0.062; OKLCH L 40.3% C 0.100 H 280.9°. Best body text is #FFFFFF at 9.34:1 contrast (WCAG AA passes).

Color values

HEX#40407D
RGBrgb(64, 64, 125)
HSLhsl(240, 32%, 37%)
HSVhsv(240, 49%, 49%)
CMYKcmyk(48.8%, 48.8%, 0%, 51%)
CIE-LABlab(30.00, 17.57, -34.75)
CIE-LCHlch(30.00, 38.94, 296.83°)
OKLaboklab(40.35% 0.019 -0.0986)
OKLCHoklch(40.35% 0.1 280.9)
XYZxyz(7.6483, 6.2371, 20.1989)
Luminance0.0624 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40407D #7D7D40
analogous
#405F7D #40407D #5F407D
triadic
#40407D #7D4040 #407D40
tetradic
#40407D #7D405F #7D7D40 #407D5F
square
#40407D #7D405F #7D7D40 #407D5F
split-complementary
#40407D #7D5F40 #5F7D40
monochromatic
#17172C #2B2B55 #40407D #5555A5 #7C7CBC

Accessibility & contrast

On white

9.34
#40407D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #40407D
9.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40407D#FFFFFF#000000##FFFFFF
##40407D1.009.342.259.34
#FFFFFF9.341.0021.001.00
#0000002.2521.001.0021.00
##FFFFFF9.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#26497F
Deuteranopia (green-blind)
#22447C
Tritanopia (blue-blind)
#2B4D58
Achromatopsia (no color)
#474747

Design tokens & code

CSS
--color: #40407d;
/* rgb */ color: rgb(64, 64, 125);
/* oklch */ color: oklch(40.3% 0.100 280.9);
Tailwind
colors: {
  custom: {
    50: '#7974a3',
    500: '#40407d',
    950: '#000000',
  },
}
SCSS
$custom: #40407d;
$custom-light: #7974a3;
$custom-dark: #000000;
JSON
{
  "hex": "#40407d",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 125
  },
  "hsl": {
    "h": 240,
    "s": 32.275,
    "l": 37.059
  },
  "oklch": {
    "l": 0.40345,
    "c": 0.10047,
    "h": 280.9
  },
  "luminance": 0.06237
}

Semantic roles & 50–950 ramp

primary
#40407D
secondary
#A6A673
accent
#C85FC8
background
#F7F7FA
surface
#EEEDF4
border
#C9C8CE
text
#09080F
muted
#7B7B7F

Preview Lab

Preview with #40407D

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

Preview Lab → · Contrast checker → · Palette generator →

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