#4040BB#4040BB

#4040BB is a mid, vivid blue. Relative luminance 0.083; OKLCH L 45.3% C 0.188 H 275.9°. Best body text is #FFFFFF at 7.87:1 contrast (WCAG AA passes).

Color values

HEX#4040BB
RGBrgb(64, 64, 187)
HSLhsl(240, 49%, 49%)
HSVhsv(240, 66%, 73%)
CMYKcmyk(65.8%, 65.8%, 0%, 26.7%)
CIE-LABlab(34.69, 38.56, -64.75)
CIE-LCHlch(34.69, 75.37, 300.78°)
OKLaboklab(45.29% 0.0192 -0.1868)
OKLCHoklch(45.29% 0.188 275.9)
XYZxyz(12.9144, 8.3435, 47.9340)
Luminance0.0834 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040BB #BBBB40
analogous
#407EBB #4040BB #7E40BB
triadic
#4040BB #BB4040 #40BB40
tetradic
#4040BB #BB407E #BBBB40 #40BB7E
square
#4040BB #BB407E #BBBB40 #40BB7E
split-complementary
#4040BB #BB7E40 #7EBB40
monochromatic
#212160 #30308D #4040BB #6C6CCD #9999DC

Accessibility & contrast

On white

7.87
#4040BB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.67
#4040BB on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##4040BB#FFFFFF#000000##FFFFFF
##4040BB1.007.872.677.87
#FFFFFF7.871.0021.001.00
#0000002.6721.001.0021.00
##FFFFFF7.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057BF
Deuteranopia (green-blind)
#004CB9
Tritanopia (blue-blind)
#006078
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #4040bb;
/* rgb */ color: rgb(64, 64, 187);
/* oklch */ color: oklch(45.3% 0.188 275.9);
Tailwind
colors: {
  custom: {
    50: '#8475d0',
    500: '#4040bb',
    950: '#000000',
  },
}
SCSS
$custom: #4040bb;
$custom-light: #8475d0;
$custom-dark: #000000;
JSON
{
  "hex": "#4040bb",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 187
  },
  "hsl": {
    "h": 240,
    "s": 49.004,
    "l": 49.216
  },
  "oklch": {
    "l": 0.45291,
    "c": 0.18779,
    "h": 275.9
  },
  "luminance": 0.08345
}

Semantic roles & 50–950 ramp

primary
#4040BB
secondary
#C8C88F
accent
#D94FD9
background
#F8F7FC
surface
#F0EDF9
border
#CBC8D2
text
#0C0814
muted
#7D7B82

Preview Lab

Preview with #4040BB

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

Preview Lab → · Contrast checker → · Palette generator →

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