#4040D1#4040D1

#4040D1 is a mid, highly saturated blue. Relative luminance 0.094; OKLCH L 47.3% C 0.216 H 274.4°. Best body text is #FFFFFF at 7.31:1 contrast (WCAG AA passes).

Color values

HEX#4040D1
RGBrgb(64, 64, 209)
HSLhsl(240, 61%, 54%)
HSVhsv(240, 69%, 82%)
CMYKcmyk(69.4%, 69.4%, 0%, 18%)
CIE-LABlab(36.67, 45.88, -74.34)
CIE-LCHlch(36.67, 87.36, 301.68°)
OKLaboklab(47.33% 0.0166 -0.2149)
OKLCHoklch(47.33% 0.216 274.4)
XYZxyz(15.4526, 9.3588, 61.3013)
Luminance0.0936 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D1 #D1D140
analogous
#4088D1 #4040D1 #8840D1
triadic
#4040D1 #D14040 #40D140
tetradic
#4040D1 #D14088 #D1D140 #40D188
square
#4040D1 #D14088 #D1D140 #40D188
split-complementary
#4040D1 #D18840 #88D140
monochromatic
#1D1D79 #2929AB #4040D1 #7171DD #A3A3E9

Accessibility & contrast

On white

7.31
#4040D1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.87
#4040D1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D1
7.31:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D1#FFFFFF#000000##FFFFFF
##4040D11.007.312.877.31
#FFFFFF7.311.0021.001.00
#0000002.8721.001.0021.00
##FFFFFF7.311.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DD5
Deuteranopia (green-blind)
#004FCE
Tritanopia (blue-blind)
#006884
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #4040d1;
/* rgb */ color: rgb(64, 64, 209);
/* oklch */ color: oklch(47.3% 0.216 274.4);
Tailwind
colors: {
  custom: {
    50: '#8876e0',
    500: '#4040d1',
    950: '#000000',
  },
}
SCSS
$custom: #4040d1;
$custom-light: #8876e0;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d1",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 209
  },
  "hsl": {
    "h": 240,
    "s": 61.181,
    "l": 53.529
  },
  "oklch": {
    "l": 0.47325,
    "c": 0.21551,
    "h": 274.4
  },
  "luminance": 0.0936
}

Semantic roles & 50–950 ramp

primary
#4040D1
secondary
#D5D597
accent
#E444E4
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040D1

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

Preview Lab → · Contrast checker → · Palette generator →

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