#4040CF#4040CF

#4040CF is a mid, highly saturated blue. Relative luminance 0.093; OKLCH L 47.1% C 0.213 H 274.5°. Best body text is #FFFFFF at 7.36:1 contrast (WCAG AA passes).

Color values

HEX#4040CF
RGBrgb(64, 64, 207)
HSLhsl(240, 60%, 53%)
HSVhsv(240, 69%, 81%)
CMYKcmyk(69.1%, 69.1%, 0%, 18.8%)
CIE-LABlab(36.48, 45.23, -73.49)
CIE-LCHlch(36.48, 86.29, 301.61°)
OKLaboklab(47.14% 0.0168 -0.2124)
OKLCHoklch(47.14% 0.213 274.5)
XYZxyz(15.2065, 9.2603, 60.0054)
Luminance0.0926 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040CF #CFCF40
analogous
#4087CF #4040CF #8740CF
triadic
#4040CF #CF4040 #40CF40
tetradic
#4040CF #CF4087 #CFCF40 #40CF87
square
#4040CF #CF4087 #CFCF40 #40CF87
split-complementary
#4040CF #CF8740 #87CF40
monochromatic
#1E1E77 #2A2AA8 #4040CF #7171DB #A2A2E8

Accessibility & contrast

On white

7.36
#4040CF on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.85
#4040CF on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040CF
7.36:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040CF#FFFFFF#000000##FFFFFF
##4040CF1.007.362.857.36
#FFFFFF7.361.0021.001.00
#0000002.8521.001.0021.00
##FFFFFF7.361.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CD3
Deuteranopia (green-blind)
#004FCC
Tritanopia (blue-blind)
#006783
Achromatopsia (no color)
#565656

Design tokens & code

CSS
--color: #4040cf;
/* rgb */ color: rgb(64, 64, 207);
/* oklch */ color: oklch(47.1% 0.213 274.5);
Tailwind
colors: {
  custom: {
    50: '#8876df',
    500: '#4040cf',
    950: '#000000',
  },
}
SCSS
$custom: #4040cf;
$custom-light: #8876df;
$custom-dark: #000000;
JSON
{
  "hex": "#4040cf",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 207
  },
  "hsl": {
    "h": 240,
    "s": 59.833,
    "l": 53.137
  },
  "oklch": {
    "l": 0.47135,
    "c": 0.21305,
    "h": 274.5
  },
  "luminance": 0.09262
}

Semantic roles & 50–950 ramp

primary
#4040CF
secondary
#D4D497
accent
#E345E3
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040CF

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

Preview Lab → · Contrast checker → · Palette generator →

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