#4040C3#4040C3

#4040C3 is a mid, vivid blue. Relative luminance 0.087; OKLCH L 46.0% C 0.198 H 275.3°. Best body text is #FFFFFF at 7.67:1 contrast (WCAG AA passes).

Color values

HEX#4040C3
RGBrgb(64, 64, 195)
HSLhsl(240, 52%, 51%)
HSVhsv(240, 67%, 76%)
CMYKcmyk(67.2%, 67.2%, 0%, 23.5%)
CIE-LABlab(35.39, 41.25, -68.29)
CIE-LCHlch(35.39, 79.78, 301.13°)
OKLaboklab(46.02% 0.0184 -0.1972)
OKLCHoklch(46.02% 0.198 275.3)
XYZxyz(13.7948, 8.6957, 52.5706)
Luminance0.0870 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040C3 #C3C340
analogous
#4081C3 #4040C3 #8140C3
triadic
#4040C3 #C34040 #40C340
tetradic
#4040C3 #C34081 #C3C340 #40C381
square
#4040C3 #C34081 #C3C340 #40C381
split-complementary
#4040C3 #C38140 #81C340
monochromatic
#212168 #2F2F97 #4040C3 #6F6FD2 #9D9DE0

Accessibility & contrast

On white

7.67
#4040C3 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.74
#4040C3 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040C3
7.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040C3#FFFFFF#000000##FFFFFF
##4040C31.007.672.747.67
#FFFFFF7.671.0021.001.00
#0000002.7421.001.0021.00
##FFFFFF7.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0059C7
Deuteranopia (green-blind)
#004DC1
Tritanopia (blue-blind)
#00637C
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #4040c3;
/* rgb */ color: rgb(64, 64, 195);
/* oklch */ color: oklch(46.0% 0.198 275.3);
Tailwind
colors: {
  custom: {
    50: '#8575d6',
    500: '#4040c3',
    950: '#000000',
  },
}
SCSS
$custom: #4040c3;
$custom-light: #8575d6;
$custom-dark: #000000;
JSON
{
  "hex": "#4040c3",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 195
  },
  "hsl": {
    "h": 240,
    "s": 52.191,
    "l": 50.784
  },
  "oklch": {
    "l": 0.46017,
    "c": 0.19804,
    "h": 275.3
  },
  "luminance": 0.08697
}

Semantic roles & 50–950 ramp

primary
#4040C3
secondary
#CCCC92
accent
#DC4CDC
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4040C3

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

Preview Lab → · Contrast checker → · Palette generator →

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