#4040BA#4040BA

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

Color values

HEX#4040BA
RGBrgb(64, 64, 186)
HSLhsl(240, 49%, 49%)
HSVhsv(240, 66%, 73%)
CMYKcmyk(65.6%, 65.6%, 0%, 27.1%)
CIE-LABlab(34.60, 38.23, -64.30)
CIE-LCHlch(34.60, 74.81, 300.73°)
OKLaboklab(45.2% 0.0193 -0.1855)
OKLCHoklch(45.2% 0.187 275.9)
XYZxyz(12.8078, 8.3009, 47.3721)
Luminance0.0830 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040BA #BABA40
analogous
#407DBA #4040BA #7D40BA
triadic
#4040BA #BA4040 #40BA40
tetradic
#4040BA #BA407D #BABA40 #40BA7D
square
#4040BA #BA407D #BABA40 #40BA7D
split-complementary
#4040BA #BA7D40 #7DBA40
monochromatic
#21215F #30308C #4040BA #6B6BCC #9999DC

Accessibility & contrast

On white

7.89
#4040BA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.66
#4040BA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040BA
7.89:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040BA#FFFFFF#000000##FFFFFF
##4040BA1.007.892.667.89
#FFFFFF7.891.0021.001.00
#0000002.6621.001.0021.00
##FFFFFF7.891.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0057BE
Deuteranopia (green-blind)
#004CB8
Tritanopia (blue-blind)
#006077
Achromatopsia (no color)
#515151

Design tokens & code

CSS
--color: #4040ba;
/* rgb */ color: rgb(64, 64, 186);
/* oklch */ color: oklch(45.2% 0.186 275.9);
Tailwind
colors: {
  custom: {
    50: '#8475d0',
    500: '#4040ba',
    950: '#000000',
  },
}
SCSS
$custom: #4040ba;
$custom-light: #8475d0;
$custom-dark: #000000;
JSON
{
  "hex": "#4040ba",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 186
  },
  "hsl": {
    "h": 240,
    "s": 48.8,
    "l": 49.02
  },
  "oklch": {
    "l": 0.45201,
    "c": 0.1865,
    "h": 275.9
  },
  "luminance": 0.08302
}

Semantic roles & 50–950 ramp

primary
#4040BA
secondary
#C8C88E
accent
#D84FD8
background
#F8F7FC
surface
#F0EDF9
border
#CBC8D2
text
#0C0814
muted
#7D7B82

Preview Lab

Preview with #4040BA

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

Preview Lab → · Contrast checker → · Palette generator →

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