#4040B9#4040B9

#4040B9 is a mid, vivid blue. Relative luminance 0.083; OKLCH L 45.1% C 0.185 H 276.0°. Best body text is #FFFFFF at 7.92:1 contrast (WCAG AA passes).

Color values

HEX#4040B9
RGBrgb(64, 64, 185)
HSLhsl(240, 49%, 49%)
HSVhsv(240, 65%, 73%)
CMYKcmyk(65.4%, 65.4%, 0%, 27.5%)
CIE-LABlab(34.52, 37.89, -63.86)
CIE-LCHlch(34.52, 74.25, 300.68°)
OKLaboklab(45.11% 0.0194 -0.1842)
OKLCHoklch(45.11% 0.185 276)
XYZxyz(12.7018, 8.2585, 46.8142)
Luminance0.0826 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040B9 #B9B940
analogous
#407DB9 #4040B9 #7D40B9
triadic
#4040B9 #B94040 #40B940
tetradic
#4040B9 #B9407D #B9B940 #40B97D
square
#4040B9 #B9407D #B9B940 #40B97D
split-complementary
#4040B9 #B97D40 #7DB940
monochromatic
#21215E #30308C #4040B9 #6B6BCC #9898DB

Accessibility & contrast

On white

7.92
#4040B9 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.65
#4040B9 on #000000
AA ✗AA large ✗AAA ✗

Best text color

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

Contrast matrix

fg \ bg##4040B9#FFFFFF#000000##FFFFFF
##4040B91.007.922.657.92
#FFFFFF7.921.0021.001.00
#0000002.6521.001.0021.00
##FFFFFF7.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057BD
Deuteranopia (green-blind)
#004CB7
Tritanopia (blue-blind)
#005F77
Achromatopsia (no color)
#515151

Design tokens & code

CSS
--color: #4040b9;
/* rgb */ color: rgb(64, 64, 185);
/* oklch */ color: oklch(45.1% 0.185 276.0);
Tailwind
colors: {
  custom: {
    50: '#8375cf',
    500: '#4040b9',
    950: '#000000',
  },
}
SCSS
$custom: #4040b9;
$custom-light: #8375cf;
$custom-dark: #000000;
JSON
{
  "hex": "#4040b9",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 185
  },
  "hsl": {
    "h": 240,
    "s": 48.594,
    "l": 48.824
  },
  "oklch": {
    "l": 0.45112,
    "c": 0.1852,
    "h": 276
  },
  "luminance": 0.0826
}

Semantic roles & 50–950 ramp

primary
#4040B9
secondary
#C7C78E
accent
#D850D8
background
#F8F7FC
surface
#F0EDF9
border
#CBC8D2
text
#0C0814
muted
#7D7B82

Preview Lab

Preview with #4040B9

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

Preview Lab → · Contrast checker → · Palette generator →

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