#4040C7#4040C7

#4040C7 is a mid, highly saturated blue. Relative luminance 0.089; OKLCH L 46.4% C 0.203 H 275.1°. Best body text is #FFFFFF at 7.56:1 contrast (WCAG AA passes).

Color values

HEX#4040C7
RGBrgb(64, 64, 199)
HSLhsl(240, 55%, 52%)
HSVhsv(240, 68%, 78%)
CMYKcmyk(67.8%, 67.8%, 0%, 22%)
CIE-LABlab(35.75, 42.58, -70.04)
CIE-LCHlch(35.75, 81.97, 301.30°)
OKLaboklab(46.39% 0.0179 -0.2023)
OKLCHoklch(46.39% 0.203 275.1)
XYZxyz(14.2531, 8.8790, 54.9844)
Luminance0.0888 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040C7 #C7C740
analogous
#4084C7 #4040C7 #8440C7
triadic
#4040C7 #C74040 #40C740
tetradic
#4040C7 #C74084 #C7C740 #40C784
square
#4040C7 #C74084 #C7C740 #40C784
split-complementary
#4040C7 #C78440 #84C740
monochromatic
#20206D #2E2E9C #4040C7 #6F6FD5 #9F9FE3

Accessibility & contrast

On white

7.56
#4040C7 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.78
#4040C7 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040C7
7.56:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040C7#FFFFFF#000000##FFFFFF
##4040C71.007.562.787.56
#FFFFFF7.561.0021.001.00
#0000002.7821.001.0021.00
##FFFFFF7.561.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005ACB
Deuteranopia (green-blind)
#004EC4
Tritanopia (blue-blind)
#00647E
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #4040c7;
/* rgb */ color: rgb(64, 64, 199);
/* oklch */ color: oklch(46.4% 0.203 275.1);
Tailwind
colors: {
  custom: {
    50: '#8676d9',
    500: '#4040c7',
    950: '#000000',
  },
}
SCSS
$custom: #4040c7;
$custom-light: #8676d9;
$custom-dark: #000000;
JSON
{
  "hex": "#4040c7",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 199
  },
  "hsl": {
    "h": 240,
    "s": 54.656,
    "l": 51.569
  },
  "oklch": {
    "l": 0.46386,
    "c": 0.20309,
    "h": 275.1
  },
  "luminance": 0.0888
}

Semantic roles & 50–950 ramp

primary
#4040C7
secondary
#CFCF94
accent
#DE4ADE
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040C7

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

Preview Lab → · Contrast checker → · Palette generator →

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