#4040E4#4040E4

#4040E4 is a mid, highly saturated blue. Relative luminance 0.104; OKLCH L 49.2% C 0.238 H 273.3°. Best body text is #FFFFFF at 6.84:1 contrast (WCAG AA passes).

Color values

HEX#4040E4
RGBrgb(64, 64, 228)
HSLhsl(240, 75%, 57%)
HSVhsv(240, 72%, 89%)
CMYKcmyk(71.9%, 71.9%, 0%, 10.6%)
CIE-LABlab(38.47, 52.04, -82.26)
CIE-LCHlch(38.47, 97.34, 302.32°)
OKLaboklab(49.16% 0.0137 -0.238)
OKLCHoklch(49.16% 0.238 273.3)
XYZxyz(17.9467, 10.3564, 74.4369)
Luminance0.1036 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040E4 #E4E440
analogous
#4092E4 #4040E4 #9240E4
triadic
#4040E4 #E44040 #40E440
tetradic
#4040E4 #E44092 #E4E440 #40E492
square
#4040E4 #E44092 #E4E440 #40E492
split-complementary
#4040E4 #E49240 #92E440
monochromatic
#151595 #1D1DCA #4040E4 #7676EC #ABABF3

Accessibility & contrast

On white

6.84
#4040E4 on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.07
#4040E4 on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #4040E4
6.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040E4#FFFFFF#000000##FFFFFF
##4040E41.006.843.076.84
#FFFFFF6.841.0021.001.00
#0000003.0721.001.0021.00
##FFFFFF6.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0062E9
Deuteranopia (green-blind)
#0053E1
Tritanopia (blue-blind)
#006F8E
Achromatopsia (no color)
#5B5B5B

Design tokens & code

CSS
--color: #4040e4;
/* rgb */ color: rgb(64, 64, 228);
/* oklch */ color: oklch(49.2% 0.238 273.3);
Tailwind
colors: {
  custom: {
    50: '#8c77ee',
    500: '#4040e4',
    950: '#000000',
  },
}
SCSS
$custom: #4040e4;
$custom-light: #8c77ee;
$custom-dark: #000000;
JSON
{
  "hex": "#4040e4",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 228
  },
  "hsl": {
    "h": 240,
    "s": 75.229,
    "l": 57.255
  },
  "oklch": {
    "l": 0.49164,
    "c": 0.23838,
    "h": 273.3
  },
  "luminance": 0.10358
}

Semantic roles & 50–950 ramp

primary
#4040E4
secondary
#E1E19F
accent
#F236F2
background
#F9F7FE
surface
#F2EDFD
border
#CCC8D5
text
#0E0917
muted
#7E7B85

Preview Lab

Preview with #4040E4

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

Preview Lab → · Contrast checker → · Palette generator →

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