#4040CD#4040CD

#4040CD is a mid, highly saturated blue. Relative luminance 0.092; OKLCH L 46.9% C 0.211 H 274.7°. Best body text is #FFFFFF at 7.41:1 contrast (WCAG AA passes).

Color values

HEX#4040CD
RGBrgb(64, 64, 205)
HSLhsl(240, 59%, 53%)
HSVhsv(240, 69%, 80%)
CMYKcmyk(68.8%, 68.8%, 0%, 19.6%)
CIE-LABlab(36.30, 44.57, -72.63)
CIE-LCHlch(36.30, 85.22, 301.53°)
OKLaboklab(46.95% 0.0171 -0.2099)
OKLCHoklch(46.95% 0.211 274.7)
XYZxyz(14.9635, 9.1632, 58.7259)
Luminance0.0916 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040CD #CDCD40
analogous
#4086CD #4040CD #8640CD
triadic
#4040CD #CD4040 #40CD40
tetradic
#4040CD #CD4086 #CDCD40 #40CD86
square
#4040CD #CD4086 #CDCD40 #40CD86
split-complementary
#4040CD #CD8640 #86CD40
monochromatic
#1E1E74 #2B2BA5 #4040CD #7171DA #A1A1E6

Accessibility & contrast

On white

7.41
#4040CD on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.83
#4040CD on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040CD
7.41:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040CD#FFFFFF#000000##FFFFFF
##4040CD1.007.412.837.41
#FFFFFF7.411.0021.001.00
#0000002.8321.001.0021.00
##FFFFFF7.411.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005CD1
Deuteranopia (green-blind)
#004FCA
Tritanopia (blue-blind)
#006681
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #4040cd;
/* rgb */ color: rgb(64, 64, 205);
/* oklch */ color: oklch(46.9% 0.211 274.7);
Tailwind
colors: {
  custom: {
    50: '#8776dd',
    500: '#4040cd',
    950: '#000000',
  },
}
SCSS
$custom: #4040cd;
$custom-light: #8776dd;
$custom-dark: #000000;
JSON
{
  "hex": "#4040cd",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 205
  },
  "hsl": {
    "h": 240,
    "s": 58.506,
    "l": 52.745
  },
  "oklch": {
    "l": 0.46947,
    "c": 0.21058,
    "h": 274.7
  },
  "luminance": 0.09165
}

Semantic roles & 50–950 ramp

primary
#4040CD
secondary
#D3D396
accent
#E246E2
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040CD

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

Preview Lab → · Contrast checker → · Palette generator →

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