#4040D9#4040D9

#4040D9 is a mid, highly saturated blue. Relative luminance 0.098; OKLCH L 48.1% C 0.225 H 273.9°. Best body text is #FFFFFF at 7.11:1 contrast (WCAG AA passes).

Color values

HEX#4040D9
RGBrgb(64, 64, 217)
HSLhsl(240, 67%, 55%)
HSVhsv(240, 71%, 85%)
CMYKcmyk(70.5%, 70.5%, 0%, 14.9%)
CIE-LABlab(37.42, 48.50, -77.72)
CIE-LCHlch(37.42, 91.61, 301.97°)
OKLaboklab(48.09% 0.0154 -0.2247)
OKLCHoklch(48.09% 0.225 273.9)
XYZxyz(16.4680, 9.7649, 66.6491)
Luminance0.0977 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D9 #D9D940
analogous
#408CD9 #4040D9 #8C40D9
triadic
#4040D9 #D94040 #40D940
tetradic
#4040D9 #D9408C #D9D940 #40D98C
square
#4040D9 #D9408C #D9D940 #40D98C
split-complementary
#4040D9 #D98C40 #8CD940
monochromatic
#1A1A84 #2424B7 #4040D9 #7373E3 #A6A6ED

Accessibility & contrast

On white

7.11
#4040D9 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.95
#4040D9 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D9
7.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D9#FFFFFF#000000##FFFFFF
##4040D91.007.112.957.11
#FFFFFF7.111.0021.001.00
#0000002.9521.001.0021.00
##FFFFFF7.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FDE
Deuteranopia (green-blind)
#0051D6
Tritanopia (blue-blind)
#006B88
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #4040d9;
/* rgb */ color: rgb(64, 64, 217);
/* oklch */ color: oklch(48.1% 0.225 273.9);
Tailwind
colors: {
  custom: {
    50: '#8a76e6',
    500: '#4040d9',
    950: '#000000',
  },
}
SCSS
$custom: #4040d9;
$custom-light: #8a76e6;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d9",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 217
  },
  "hsl": {
    "h": 240,
    "s": 66.812,
    "l": 55.098
  },
  "oklch": {
    "l": 0.48091,
    "c": 0.22525,
    "h": 273.9
  },
  "luminance": 0.09767
}

Semantic roles & 50–950 ramp

primary
#4040D9
secondary
#DADA9A
accent
#EA3EEA
background
#F9F7FE
surface
#F2EDFD
border
#CCC8D5
text
#0E0816
muted
#7E7B84

Preview Lab

Preview with #4040D9

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

Preview Lab → · Contrast checker → · Palette generator →

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