#4040B3#4040B3

#4040B3 is a dark, vivid blue. Relative luminance 0.080; OKLCH L 44.6% C 0.177 H 276.4°. Best body text is #FFFFFF at 8.07:1 contrast (WCAG AA passes).

Color values

HEX#4040B3
RGBrgb(64, 64, 179)
HSLhsl(240, 47%, 48%)
HSVhsv(240, 64%, 70%)
CMYKcmyk(64.2%, 64.2%, 0%, 29.8%)
CIE-LABlab(34.00, 35.86, -61.14)
CIE-LCHlch(34.00, 70.88, 300.39°)
OKLaboklab(44.58% 0.0199 -0.1762)
OKLCHoklch(44.58% 0.177 276.4)
XYZxyz(12.0818, 8.0105, 43.5486)
Luminance0.0801 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040B3 #B3B340
analogous
#4079B3 #4040B3 #7940B3
triadic
#4040B3 #B34040 #40B340
tetradic
#4040B3 #B34079 #B3B340 #40B379
square
#4040B3 #B34079 #B3B340 #40B379
split-complementary
#4040B3 #B37940 #79B340
monochromatic
#202059 #303086 #4040B3 #6767C9 #9494D9

Accessibility & contrast

On white

8.07
#4040B3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.60
#4040B3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##4040B3#FFFFFF#000000##FFFFFF
##4040B31.008.072.608.07
#FFFFFF8.071.0021.001.00
#0000002.6021.001.0021.00
##FFFFFF8.071.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0055B7
Deuteranopia (green-blind)
#004BB1
Tritanopia (blue-blind)
#005D73
Achromatopsia (no color)
#505050

Design tokens & code

CSS
--color: #4040b3;
/* rgb */ color: rgb(64, 64, 179);
/* oklch */ color: oklch(44.6% 0.177 276.4);
Tailwind
colors: {
  custom: {
    50: '#8275cb',
    500: '#4040b3',
    950: '#000000',
  },
}
SCSS
$custom: #4040b3;
$custom-light: #8275cb;
$custom-dark: #000000;
JSON
{
  "hex": "#4040b3",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 179
  },
  "hsl": {
    "h": 240,
    "s": 47.325,
    "l": 47.647
  },
  "oklch": {
    "l": 0.44582,
    "c": 0.17734,
    "h": 276.4
  },
  "luminance": 0.08011
}

Semantic roles & 50–950 ramp

primary
#4040B3
secondary
#C4C48A
accent
#D751D7
background
#F8F7FC
surface
#F0EDF9
border
#CBC8D2
text
#0C0813
muted
#7D7B82

Preview Lab

Preview with #4040B3

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

Preview Lab → · Contrast checker → · Palette generator →

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