#4040AF#4040AF

#4040AF is a dark, vivid blue. Relative luminance 0.079; OKLCH L 44.2% C 0.172 H 276.7°. Best body text is #FFFFFF at 8.17:1 contrast (WCAG AA passes).

Color values

HEX#4040AF
RGBrgb(64, 64, 175)
HSLhsl(240, 46%, 47%)
HSVhsv(240, 63%, 69%)
CMYKcmyk(63.4%, 63.4%, 0%, 31.4%)
CIE-LABlab(33.67, 34.51, -59.31)
CIE-LCHlch(33.67, 68.62, 300.19°)
OKLaboklab(44.23% 0.0202 -0.1708)
OKLCHoklch(44.23% 0.172 276.7)
XYZxyz(11.6831, 7.8510, 41.4488)
Luminance0.0785 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040AF #AFAF40
analogous
#4078AF #4040AF #7840AF
triadic
#4040AF #AF4040 #40AF40
tetradic
#4040AF #AF4078 #AFAF40 #40AF78
square
#4040AF #AF4078 #AFAF40 #40AF78
split-complementary
#4040AF #AF7840 #78AF40
monochromatic
#1F1F55 #303082 #4040AF #6565C7 #9292D7

Accessibility & contrast

On white

8.17
#4040AF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.57
#4040AF on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##4040AF#FFFFFF#000000##FFFFFF
##4040AF1.008.172.578.17
#FFFFFF8.171.0021.001.00
#0000002.5721.001.0021.00
##FFFFFF8.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0054B3
Deuteranopia (green-blind)
#004AAD
Tritanopia (blue-blind)
#005C71
Achromatopsia (no color)
#4F4F4F

Design tokens & code

CSS
--color: #4040af;
/* rgb */ color: rgb(64, 64, 175);
/* oklch */ color: oklch(44.2% 0.172 276.7);
Tailwind
colors: {
  custom: {
    50: '#8175c8',
    500: '#4040af',
    950: '#000000',
  },
}
SCSS
$custom: #4040af;
$custom-light: #8175c8;
$custom-dark: #000000;
JSON
{
  "hex": "#4040af",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 175
  },
  "hsl": {
    "h": 240,
    "s": 46.444,
    "l": 46.863
  },
  "oklch": {
    "l": 0.44234,
    "c": 0.17204,
    "h": 276.7
  },
  "luminance": 0.07852
}

Semantic roles & 50–950 ramp

primary
#4040AF
secondary
#C3C388
accent
#D652D6
background
#F8F7FC
surface
#F0EDF8
border
#CBC8D1
text
#0C0813
muted
#7D7B82

Preview Lab

Preview with #4040AF

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

Preview Lab → · Contrast checker → · Palette generator →

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