#4040BE#4040BE

#4040BE is a mid, vivid blue. Relative luminance 0.085; OKLCH L 45.6% C 0.192 H 275.7°. Best body text is #FFFFFF at 7.79:1 contrast (WCAG AA passes).

Color values

HEX#4040BE
RGBrgb(64, 64, 190)
HSLhsl(240, 50%, 50%)
HSVhsv(240, 66%, 75%)
CMYKcmyk(66.3%, 66.3%, 0%, 25.5%)
CIE-LABlab(34.95, 39.57, -66.09)
CIE-LCHlch(34.95, 77.03, 300.91°)
OKLaboklab(45.56% 0.0189 -0.1907)
OKLCHoklch(45.56% 0.192 275.7)
XYZxyz(13.2390, 8.4733, 49.6431)
Luminance0.0847 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040BE #BEBE40
analogous
#407FBE #4040BE #7F40BE
triadic
#4040BE #BE4040 #40BE40
tetradic
#4040BE #BE407F #BEBE40 #40BE7F
square
#4040BE #BE407F #BEBE40 #40BE7F
split-complementary
#4040BE #BE7F40 #7FBE40
monochromatic
#212162 #313190 #4040BE #6D6DCE #9B9BDD

Accessibility & contrast

On white

7.79
#4040BE on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #4040BE
7.79:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040BE#FFFFFF#000000##FFFFFF
##4040BE1.007.792.697.79
#FFFFFF7.791.0021.001.00
#0000002.6921.001.0021.00
##FFFFFF7.791.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #4040be;
/* rgb */ color: rgb(64, 64, 190);
/* oklch */ color: oklch(45.6% 0.192 275.7);
Tailwind
colors: {
  custom: {
    50: '#8475d3',
    500: '#4040be',
    950: '#000000',
  },
}
SCSS
$custom: #4040be;
$custom-light: #8475d3;
$custom-dark: #000000;
JSON
{
  "hex": "#4040be",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 190
  },
  "hsl": {
    "h": 240,
    "s": 49.606,
    "l": 49.804
  },
  "oklch": {
    "l": 0.45562,
    "c": 0.19166,
    "h": 275.7
  },
  "luminance": 0.08474
}

Semantic roles & 50–950 ramp

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

Preview Lab

Preview with #4040BE

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

Preview Lab → · Contrast checker → · Palette generator →

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