#4040D8#4040D8

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

Color values

HEX#4040D8
RGBrgb(64, 64, 216)
HSLhsl(240, 66%, 55%)
HSVhsv(240, 70%, 85%)
CMYKcmyk(70.4%, 70.4%, 0%, 15.3%)
CIE-LABlab(37.32, 48.17, -77.30)
CIE-LCHlch(37.32, 91.08, 301.93°)
OKLaboklab(47.99% 0.0156 -0.2235)
OKLCHoklch(47.99% 0.224 274)
XYZxyz(16.3383, 9.7131, 65.9662)
Luminance0.0972 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D8 #D8D840
analogous
#408CD8 #4040D8 #8C40D8
triadic
#4040D8 #D84040 #40D840
tetradic
#4040D8 #D8408C #D8D840 #40D88C
square
#4040D8 #D8408C #D8D840 #40D88C
split-complementary
#4040D8 #D88C40 #8CD840
monochromatic
#1B1B83 #2525B6 #4040D8 #7373E2 #A6A6ED

Accessibility & contrast

On white

7.14
#4040D8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.94
#4040D8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D8
7.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D8#FFFFFF#000000##FFFFFF
##4040D81.007.142.947.14
#FFFFFF7.141.0021.001.00
#0000002.9421.001.0021.00
##FFFFFF7.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005FDD
Deuteranopia (green-blind)
#0051D5
Tritanopia (blue-blind)
#006A88
Achromatopsia (no color)
#585858

Design tokens & code

CSS
--color: #4040d8;
/* rgb */ color: rgb(64, 64, 216);
/* oklch */ color: oklch(48.0% 0.224 274.0);
Tailwind
colors: {
  custom: {
    50: '#8a76e5',
    500: '#4040d8',
    950: '#000000',
  },
}
SCSS
$custom: #4040d8;
$custom-light: #8a76e5;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d8",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 216
  },
  "hsl": {
    "h": 240,
    "s": 66.087,
    "l": 54.902
  },
  "oklch": {
    "l": 0.47994,
    "c": 0.22404,
    "h": 274
  },
  "luminance": 0.09715
}

Semantic roles & 50–950 ramp

primary
#4040D8
secondary
#DADA9A
accent
#E93FE9
background
#F9F7FE
surface
#F2EDFC
border
#CCC8D5
text
#0D0816
muted
#7E7B84

Preview Lab

Preview with #4040D8

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

Preview Lab → · Contrast checker → · Palette generator →

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