#4040AB#4040AB

#4040AB is a dark, vivid blue. Relative luminance 0.077; OKLCH L 43.9% C 0.167 H 277.0°. Best body text is #FFFFFF at 8.27:1 contrast (WCAG AA passes).

Color values

HEX#4040AB
RGBrgb(64, 64, 171)
HSLhsl(240, 46%, 46%)
HSVhsv(240, 63%, 67%)
CMYKcmyk(62.6%, 62.6%, 0%, 32.9%)
CIE-LABlab(33.34, 33.15, -57.46)
CIE-LCHlch(33.34, 66.34, 299.98°)
OKLaboklab(43.89% 0.0204 -0.1654)
OKLCHoklch(43.89% 0.167 277)
XYZxyz(11.2961, 7.6962, 39.4104)
Luminance0.0770 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040AB #ABAB40
analogous
#4075AB #4040AB #7540AB
triadic
#4040AB #AB4040 #40AB40
tetradic
#4040AB #AB4075 #ABAB40 #40AB75
square
#4040AB #AB4075 #ABAB40 #40AB75
split-complementary
#4040AB #AB7540 #75AB40
monochromatic
#1F1F52 #2F2F7E #4040AB #6363C5 #9090D5

Accessibility & contrast

On white

8.27
#4040AB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.54
#4040AB on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##4040AB#FFFFFF#000000##FFFFFF
##4040AB1.008.272.548.27
#FFFFFF8.271.0021.001.00
#0000002.5421.001.0021.00
##FFFFFF8.271.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0053AE
Deuteranopia (green-blind)
#004AA9
Tritanopia (blue-blind)
#005B6F
Achromatopsia (no color)
#4E4E4E

Design tokens & code

CSS
--color: #4040ab;
/* rgb */ color: rgb(64, 64, 171);
/* oklch */ color: oklch(43.9% 0.167 277.0);
Tailwind
colors: {
  custom: {
    50: '#8175c5',
    500: '#4040ab',
    950: '#000000',
  },
}
SCSS
$custom: #4040ab;
$custom-light: #8175c5;
$custom-dark: #000000;
JSON
{
  "hex": "#4040ab",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 171
  },
  "hsl": {
    "h": 240,
    "s": 45.532,
    "l": 46.078
  },
  "oklch": {
    "l": 0.4389,
    "c": 0.16668,
    "h": 277
  },
  "luminance": 0.07697
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #4040AB

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

Preview Lab → · Contrast checker → · Palette generator →

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