#4040A3#4040A3

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

Color values

HEX#4040A3
RGBrgb(64, 64, 163)
HSLhsl(240, 44%, 45%)
HSVhsv(240, 61%, 64%)
CMYKcmyk(60.7%, 60.7%, 0%, 36.1%)
CIE-LABlab(32.70, 30.42, -53.70)
CIE-LCHlch(32.70, 61.72, 299.53°)
OKLaboklab(43.22% 0.0208 -0.1544)
OKLCHoklch(43.22% 0.156 277.7)
XYZxyz(10.5565, 7.4003, 35.5153)
Luminance0.0740 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040A3 #A3A340
analogous
#4072A3 #4040A3 #7240A3
triadic
#4040A3 #A34040 #40A340
tetradic
#4040A3 #A34072 #A3A340 #40A372
square
#4040A3 #A34072 #A3A340 #40A372
split-complementary
#4040A3 #A37240 #72A340
monochromatic
#1D1D4B #2F2F77 #4040A3 #6060C0 #8C8CD2

Accessibility & contrast

On white

8.47
#4040A3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.48
#4040A3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040A3
8.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040A3#FFFFFF#000000##FFFFFF
##4040A31.008.472.488.47
#FFFFFF8.471.0021.001.00
#0000002.4821.001.0021.00
##FFFFFF8.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0051A6
Deuteranopia (green-blind)
#0049A1
Tritanopia (blue-blind)
#00586B
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #4040a3;
/* rgb */ color: rgb(64, 64, 163);
/* oklch */ color: oklch(43.2% 0.156 277.7);
Tailwind
colors: {
  custom: {
    50: '#7f75bf',
    500: '#4040a3',
    950: '#000000',
  },
}
SCSS
$custom: #4040a3;
$custom-light: #7f75bf;
$custom-dark: #000000;
JSON
{
  "hex": "#4040a3",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 163
  },
  "hsl": {
    "h": 240,
    "s": 43.612,
    "l": 44.51
  },
  "oklch": {
    "l": 0.43219,
    "c": 0.15577,
    "h": 277.7
  },
  "luminance": 0.07401
}

Semantic roles & 50–950 ramp

primary
#4040A3
secondary
#BDBD82
accent
#D354D3
background
#F8F7FB
surface
#EFEDF7
border
#CAC8D0
text
#0B0812
muted
#7C7B81

Preview Lab

Preview with #4040A3

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

Preview Lab → · Contrast checker → · Palette generator →

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