#4040A2#4040A2

#4040A2 is a dark, vivid blue. Relative luminance 0.074; OKLCH L 43.1% C 0.154 H 277.7°. Best body text is #FFFFFF at 8.49:1 contrast (WCAG AA passes).

Color values

HEX#4040A2
RGBrgb(64, 64, 162)
HSLhsl(240, 43%, 44%)
HSVhsv(240, 60%, 64%)
CMYKcmyk(60.5%, 60.5%, 0%, 36.5%)
CIE-LABlab(32.62, 30.08, -53.23)
CIE-LCHlch(32.62, 61.14, 299.47°)
OKLaboklab(43.14% 0.0208 -0.153)
OKLCHoklch(43.14% 0.154 277.7)
XYZxyz(10.4672, 7.3646, 35.0453)
Luminance0.0736 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040A2 #A2A240
analogous
#4071A2 #4040A2 #7140A2
triadic
#4040A2 #A24040 #40A240
tetradic
#4040A2 #A24071 #A2A240 #40A271
square
#4040A2 #A24071 #A2A240 #40A271
split-complementary
#4040A2 #A27140 #71A240
monochromatic
#1D1D4A #2F2F76 #4040A2 #5F5FC0 #8B8BD1

Accessibility & contrast

On white

8.49
#4040A2 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.47
#4040A2 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040A2
8.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040A2#FFFFFF#000000##FFFFFF
##4040A21.008.492.478.49
#FFFFFF8.491.0021.001.00
#0000002.4721.001.0021.00
##FFFFFF8.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051A5
Deuteranopia (green-blind)
#0049A0
Tritanopia (blue-blind)
#00586A
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #4040a2;
/* rgb */ color: rgb(64, 64, 162);
/* oklch */ color: oklch(43.1% 0.154 277.7);
Tailwind
colors: {
  custom: {
    50: '#7f75be',
    500: '#4040a2',
    950: '#000000',
  },
}
SCSS
$custom: #4040a2;
$custom-light: #7f75be;
$custom-dark: #000000;
JSON
{
  "hex": "#4040a2",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 162
  },
  "hsl": {
    "h": 240,
    "s": 43.363,
    "l": 44.314
  },
  "oklch": {
    "l": 0.43136,
    "c": 0.1544,
    "h": 277.7
  },
  "luminance": 0.07365
}

Semantic roles & 50–950 ramp

primary
#4040A2
secondary
#BCBC82
accent
#D355D3
background
#F8F7FB
surface
#EFEDF7
border
#CAC8D0
text
#0B0812
muted
#7C7B81

Preview Lab

Preview with #4040A2

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

Preview Lab → · Contrast checker → · Palette generator →

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