#4040D6#4040D6

#4040D6 is a mid, highly saturated blue. Relative luminance 0.096; OKLCH L 47.8% C 0.222 H 274.1°. Best body text is #FFFFFF at 7.19:1 contrast (WCAG AA passes).

Color values

HEX#4040D6
RGBrgb(64, 64, 214)
HSLhsl(240, 65%, 55%)
HSVhsv(240, 70%, 84%)
CMYKcmyk(70.1%, 70.1%, 0%, 16.1%)
CIE-LABlab(37.13, 47.52, -76.46)
CIE-LCHlch(37.13, 90.02, 301.86°)
OKLaboklab(47.8% 0.0159 -0.221)
OKLCHoklch(47.8% 0.222 274.1)
XYZxyz(16.0813, 9.6103, 64.6128)
Luminance0.0961 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D6 #D6D640
analogous
#408BD6 #4040D6 #8B40D6
triadic
#4040D6 #D64040 #40D640
tetradic
#4040D6 #D6408B #D6D640 #40D68B
square
#4040D6 #D6408B #D6D640 #40D68B
split-complementary
#4040D6 #D68B40 #8BD640
monochromatic
#1B1B80 #2626B2 #4040D6 #7272E1 #A5A5EC

Accessibility & contrast

On white

7.19
#4040D6 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.92
#4040D6 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D6
7.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D6#FFFFFF#000000##FFFFFF
##4040D61.007.192.927.19
#FFFFFF7.191.0021.001.00
#0000002.9221.001.0021.00
##FFFFFF7.191.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005EDB
Deuteranopia (green-blind)
#0050D3
Tritanopia (blue-blind)
#006A86
Achromatopsia (no color)
#575757

Design tokens & code

CSS
--color: #4040d6;
/* rgb */ color: rgb(64, 64, 214);
/* oklch */ color: oklch(47.8% 0.222 274.1);
Tailwind
colors: {
  custom: {
    50: '#8976e4',
    500: '#4040d6',
    950: '#000000',
  },
}
SCSS
$custom: #4040d6;
$custom-light: #8976e4;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d6",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 214
  },
  "hsl": {
    "h": 240,
    "s": 64.655,
    "l": 54.51
  },
  "oklch": {
    "l": 0.47802,
    "c": 0.22162,
    "h": 274.1
  },
  "luminance": 0.09612
}

Semantic roles & 50–950 ramp

primary
#4040D6
secondary
#D9D999
accent
#E840E8
background
#F9F7FE
surface
#F2EDFC
border
#CCC8D5
text
#0D0816
muted
#7E7B84

Preview Lab

Preview with #4040D6

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

Preview Lab → · Contrast checker → · Palette generator →

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