#4040D7#4040D7

#4040D7 is a mid, highly saturated blue. Relative luminance 0.097; OKLCH L 47.9% C 0.223 H 274.0°. Best body text is #FFFFFF at 7.16:1 contrast (WCAG AA passes).

Color values

HEX#4040D7
RGBrgb(64, 64, 215)
HSLhsl(240, 65%, 55%)
HSVhsv(240, 70%, 84%)
CMYKcmyk(70.2%, 70.2%, 0%, 15.7%)
CIE-LABlab(37.23, 47.85, -76.88)
CIE-LCHlch(37.23, 90.55, 301.90°)
OKLaboklab(47.9% 0.0157 -0.2223)
OKLCHoklch(47.9% 0.223 274)
XYZxyz(16.2094, 9.6615, 65.2874)
Luminance0.0966 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D7 #D7D740
analogous
#408CD7 #4040D7 #8C40D7
triadic
#4040D7 #D74040 #40D740
tetradic
#4040D7 #D7408C #D7D740 #40D78C
square
#4040D7 #D7408C #D7D740 #40D78C
split-complementary
#4040D7 #D78C40 #8CD740
monochromatic
#1B1B81 #2626B4 #4040D7 #7373E2 #A5A5EC

Accessibility & contrast

On white

7.16
#4040D7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.93
#4040D7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D7
7.16:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D7#FFFFFF#000000##FFFFFF
##4040D71.007.162.937.16
#FFFFFF7.161.0021.001.00
#0000002.9321.001.0021.00
##FFFFFF7.161.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FDC
Deuteranopia (green-blind)
#0050D4
Tritanopia (blue-blind)
#006A87
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #4040d7;
/* rgb */ color: rgb(64, 64, 215);
/* oklch */ color: oklch(47.9% 0.223 274.0);
Tailwind
colors: {
  custom: {
    50: '#8a76e5',
    500: '#4040d7',
    950: '#000000',
  },
}
SCSS
$custom: #4040d7;
$custom-light: #8a76e5;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d7",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 215
  },
  "hsl": {
    "h": 240,
    "s": 65.368,
    "l": 54.706
  },
  "oklch": {
    "l": 0.47898,
    "c": 0.22283,
    "h": 274
  },
  "luminance": 0.09663
}

Semantic roles & 50–950 ramp

primary
#4040D7
secondary
#D9D99A
accent
#E83FE8
background
#F9F7FE
surface
#F2EDFC
border
#CCC8D5
text
#0D0816
muted
#7E7B84

Preview Lab

Preview with #4040D7

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

Preview Lab → · Contrast checker → · Palette generator →

#4040D7 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva