#4040D0#4040D0

#4040D0 is a mid, highly saturated blue. Relative luminance 0.093; OKLCH L 47.2% C 0.214 H 274.5°. Best body text is #FFFFFF at 7.34:1 contrast (WCAG AA passes).

Color values

HEX#4040D0
RGBrgb(64, 64, 208)
HSLhsl(240, 61%, 53%)
HSVhsv(240, 69%, 82%)
CMYKcmyk(69.2%, 69.2%, 0%, 18.4%)
CIE-LABlab(36.57, 45.55, -73.92)
CIE-LCHlch(36.57, 86.83, 301.65°)
OKLaboklab(47.23% 0.0167 -0.2136)
OKLCHoklch(47.23% 0.214 274.5)
XYZxyz(15.3291, 9.3094, 60.6513)
Luminance0.0931 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D0 #D0D040
analogous
#4088D0 #4040D0 #8840D0
triadic
#4040D0 #D04040 #40D040
tetradic
#4040D0 #D04088 #D0D040 #40D088
square
#4040D0 #D04088 #D0D040 #40D088
split-complementary
#4040D0 #D08840 #88D040
monochromatic
#1E1E78 #2A2AA9 #4040D0 #7171DC #A2A2E8

Accessibility & contrast

On white

7.34
#4040D0 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.86
#4040D0 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D0
7.34:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D0#FFFFFF#000000##FFFFFF
##4040D01.007.342.867.34
#FFFFFF7.341.0021.001.00
#0000002.8621.001.0021.00
##FFFFFF7.341.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DD4
Deuteranopia (green-blind)
#004FCD
Tritanopia (blue-blind)
#006783
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #4040d0;
/* rgb */ color: rgb(64, 64, 208);
/* oklch */ color: oklch(47.2% 0.214 274.5);
Tailwind
colors: {
  custom: {
    50: '#8876e0',
    500: '#4040d0',
    950: '#000000',
  },
}
SCSS
$custom: #4040d0;
$custom-light: #8876e0;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d0",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 208
  },
  "hsl": {
    "h": 240,
    "s": 60.504,
    "l": 53.333
  },
  "oklch": {
    "l": 0.4723,
    "c": 0.21428,
    "h": 274.5
  },
  "luminance": 0.09311
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #4040D0

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

Preview Lab → · Contrast checker → · Palette generator →

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