#4040AA#4040AA

#4040AA is a dark, vivid blue. Relative luminance 0.077; OKLCH L 43.8% C 0.165 H 277.1°. Best body text is #FFFFFF at 8.29:1 contrast (WCAG AA passes).

Color values

HEX#4040AA
RGBrgb(64, 64, 170)
HSLhsl(240, 45%, 46%)
HSVhsv(240, 62%, 67%)
CMYKcmyk(62.4%, 62.4%, 0%, 33.3%)
CIE-LABlab(33.26, 32.81, -56.99)
CIE-LCHlch(33.26, 65.76, 299.93°)
OKLaboklab(43.81% 0.0205 -0.164)
OKLCHoklch(43.81% 0.165 277.1)
XYZxyz(11.2011, 7.6582, 38.9103)
Luminance0.0766 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040AA #AAAA40
analogous
#4075AA #4040AA #7540AA
triadic
#4040AA #AA4040 #40AA40
tetradic
#4040AA #AA4075 #AAAA40 #40AA75
square
#4040AA #AA4075 #AAAA40 #40AA75
split-complementary
#4040AA #AA7540 #75AA40
monochromatic
#1F1F51 #2F2F7E #4040AA #6363C4 #8F8FD5

Accessibility & contrast

On white

8.29
#4040AA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.53
#4040AA on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##4040AA#FFFFFF#000000##FFFFFF
##4040AA1.008.292.538.29
#FFFFFF8.291.0021.001.00
#0000002.5321.001.0021.00
##FFFFFF8.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053AD
Deuteranopia (green-blind)
#004AA8
Tritanopia (blue-blind)
#005A6F
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #4040aa;
/* rgb */ color: rgb(64, 64, 170);
/* oklch */ color: oklch(43.8% 0.165 277.1);
Tailwind
colors: {
  custom: {
    50: '#8075c4',
    500: '#4040aa',
    950: '#000000',
  },
}
SCSS
$custom: #4040aa;
$custom-light: #8075c4;
$custom-dark: #000000;
JSON
{
  "hex": "#4040aa",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 170
  },
  "hsl": {
    "h": 240,
    "s": 45.299,
    "l": 45.882
  },
  "oklch": {
    "l": 0.43805,
    "c": 0.16533,
    "h": 277.1
  },
  "luminance": 0.07659
}

Semantic roles & 50–950 ramp

primary
#4040AA
secondary
#C0C086
accent
#D553D5
background
#F8F7FC
surface
#EFEDF8
border
#CAC8D1
text
#0B0813
muted
#7C7B82

Preview Lab

Preview with #4040AA

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

Preview Lab → · Contrast checker → · Palette generator →

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