#4040BD#4040BD

#4040BD is a mid, vivid blue. Relative luminance 0.084; OKLCH L 45.5% C 0.190 H 275.7°. Best body text is #FFFFFF at 7.82:1 contrast (WCAG AA passes).

Color values

HEX#4040BD
RGBrgb(64, 64, 189)
HSLhsl(240, 49%, 50%)
HSVhsv(240, 66%, 74%)
CMYKcmyk(66.1%, 66.1%, 0%, 25.9%)
CIE-LABlab(34.86, 39.24, -65.64)
CIE-LCHlch(34.86, 76.48, 300.87°)
OKLaboklab(45.47% 0.019 -0.1894)
OKLCHoklch(45.47% 0.19 275.7)
XYZxyz(13.1300, 8.4298, 49.0694)
Luminance0.0843 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040BD #BDBD40
analogous
#407FBD #4040BD #7F40BD
triadic
#4040BD #BD4040 #40BD40
tetradic
#4040BD #BD407F #BDBD40 #40BD7F
square
#4040BD #BD407F #BDBD40 #40BD7F
split-complementary
#4040BD #BD7F40 #7FBD40
monochromatic
#212162 #31318F #4040BD #6D6DCD #9A9ADD

Accessibility & contrast

On white

7.82
#4040BD on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.69
#4040BD on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040BD
7.82:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040BD#FFFFFF#000000##FFFFFF
##4040BD1.007.822.697.82
#FFFFFF7.821.0021.001.00
#0000002.6921.001.0021.00
##FFFFFF7.821.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0058C1
Deuteranopia (green-blind)
#004CBB
Tritanopia (blue-blind)
#006179
Achromatopsia (no color)
#525252

Design tokens & code

CSS
--color: #4040bd;
/* rgb */ color: rgb(64, 64, 189);
/* oklch */ color: oklch(45.5% 0.190 275.7);
Tailwind
colors: {
  custom: {
    50: '#8475d2',
    500: '#4040bd',
    950: '#000000',
  },
}
SCSS
$custom: #4040bd;
$custom-light: #8475d2;
$custom-dark: #000000;
JSON
{
  "hex": "#4040bd",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 189
  },
  "hsl": {
    "h": 240,
    "s": 49.407,
    "l": 49.608
  },
  "oklch": {
    "l": 0.45471,
    "c": 0.19037,
    "h": 275.7
  },
  "luminance": 0.08431
}

Semantic roles & 50–950 ramp

primary
#4040BD
secondary
#C9C990
accent
#D94FD9
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4040BD

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

Preview Lab → · Contrast checker → · Palette generator →

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