#4040D2#4040D2

#4040D2 is a mid, highly saturated blue. Relative luminance 0.094; OKLCH L 47.4% C 0.217 H 274.3°. Best body text is #FFFFFF at 7.29:1 contrast (WCAG AA passes).

Color values

HEX#4040D2
RGBrgb(64, 64, 210)
HSLhsl(240, 62%, 54%)
HSVhsv(240, 70%, 82%)
CMYKcmyk(69.5%, 69.5%, 0%, 17.6%)
CIE-LABlab(36.76, 46.21, -74.77)
CIE-LCHlch(36.76, 87.90, 301.72°)
OKLaboklab(47.42% 0.0164 -0.2161)
OKLCHoklch(47.42% 0.217 274.3)
XYZxyz(15.5767, 9.4084, 61.9554)
Luminance0.0941 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040D2 #D2D240
analogous
#4089D2 #4040D2 #8940D2
triadic
#4040D2 #D24040 #40D240
tetradic
#4040D2 #D24089 #D2D240 #40D289
square
#4040D2 #D24089 #D2D240 #40D289
split-complementary
#4040D2 #D28940 #89D240
monochromatic
#1D1D7B #2929AC #4040D2 #7272DE #A3A3E9

Accessibility & contrast

On white

7.29
#4040D2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.88
#4040D2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040D2
7.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040D2#FFFFFF#000000##FFFFFF
##4040D21.007.292.887.29
#FFFFFF7.291.0021.001.00
#0000002.8821.001.0021.00
##FFFFFF7.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005DD6
Deuteranopia (green-blind)
#0050CF
Tritanopia (blue-blind)
#006884
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #4040d2;
/* rgb */ color: rgb(64, 64, 210);
/* oklch */ color: oklch(47.4% 0.217 274.3);
Tailwind
colors: {
  custom: {
    50: '#8876e1',
    500: '#4040d2',
    950: '#000000',
  },
}
SCSS
$custom: #4040d2;
$custom-light: #8876e1;
$custom-dark: #000000;
JSON
{
  "hex": "#4040d2",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 210
  },
  "hsl": {
    "h": 240,
    "s": 61.864,
    "l": 53.725
  },
  "oklch": {
    "l": 0.4742,
    "c": 0.21673,
    "h": 274.3
  },
  "luminance": 0.0941
}

Semantic roles & 50–950 ramp

primary
#4040D2
secondary
#D6D698
accent
#E543E5
background
#F9F7FE
surface
#F1EDFC
border
#CBC8D5
text
#0D0815
muted
#7E7B84

Preview Lab

Preview with #4040D2

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

Preview Lab → · Contrast checker → · Palette generator →

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