#4040C8#4040C8

#4040C8 is a mid, highly saturated blue. Relative luminance 0.089; OKLCH L 46.5% C 0.204 H 275.0°. Best body text is #FFFFFF at 7.54:1 contrast (WCAG AA passes).

Color values

HEX#4040C8
RGBrgb(64, 64, 200)
HSLhsl(240, 55%, 52%)
HSVhsv(240, 68%, 78%)
CMYKcmyk(68%, 68%, 0%, 21.6%)
CIE-LABlab(35.84, 42.91, -70.48)
CIE-LCHlch(35.84, 82.51, 301.34°)
OKLaboklab(46.48% 0.0177 -0.2036)
OKLCHoklch(46.48% 0.204 275)
XYZxyz(14.3696, 8.9256, 55.5979)
Luminance0.0893 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040C8 #C8C840
analogous
#4084C8 #4040C8 #8440C8
triadic
#4040C8 #C84040 #40C840
tetradic
#4040C8 #C84084 #C8C840 #40C884
square
#4040C8 #C84084 #C8C840 #40C884
split-complementary
#4040C8 #C88440 #84C840
monochromatic
#20206E #2D2D9D #4040C8 #7070D6 #9F9FE3

Accessibility & contrast

On white

7.54
#4040C8 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.79
#4040C8 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040C8
7.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040C8#FFFFFF#000000##FFFFFF
##4040C81.007.542.797.54
#FFFFFF7.541.0021.001.00
#0000002.7921.001.0021.00
##FFFFFF7.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BCC
Deuteranopia (green-blind)
#004EC5
Tritanopia (blue-blind)
#00657F
Achromatopsia (no color)
#545454

Design tokens & code

CSS
--color: #4040c8;
/* rgb */ color: rgb(64, 64, 200);
/* oklch */ color: oklch(46.5% 0.204 275.0);
Tailwind
colors: {
  custom: {
    50: '#8676da',
    500: '#4040c8',
    950: '#000000',
  },
}
SCSS
$custom: #4040c8;
$custom-light: #8676da;
$custom-dark: #000000;
JSON
{
  "hex": "#4040c8",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 200
  },
  "hsl": {
    "h": 240,
    "s": 55.285,
    "l": 51.765
  },
  "oklch": {
    "l": 0.46479,
    "c": 0.20434,
    "h": 275
  },
  "luminance": 0.08927
}

Semantic roles & 50–950 ramp

primary
#4040C8
secondary
#D0D094
accent
#DF49DF
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040C8

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

Preview Lab → · Contrast checker → · Palette generator →

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