#4040C0#4040C0

#4040C0 is a mid, vivid blue. Relative luminance 0.086; OKLCH L 45.7% C 0.194 H 275.5°. Best body text is #FFFFFF at 7.74:1 contrast (WCAG AA passes).

Color values

HEX#4040C0
RGBrgb(64, 64, 192)
HSLhsl(240, 50%, 50%)
HSVhsv(240, 67%, 75%)
CMYKcmyk(66.7%, 66.7%, 0%, 24.7%)
CIE-LABlab(35.13, 40.24, -66.97)
CIE-LCHlch(35.13, 78.13, 301.00°)
OKLaboklab(45.74% 0.0187 -0.1933)
OKLCHoklch(45.74% 0.194 275.5)
XYZxyz(13.4590, 8.5614, 50.8022)
Luminance0.0856 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040C0 #C0C040
analogous
#4080C0 #4040C0 #8040C0
triadic
#4040C0 #C04040 #40C040
tetradic
#4040C0 #C04080 #C0C040 #40C080
square
#4040C0 #C04080 #C0C040 #40C080
split-complementary
#4040C0 #C08040 #80C040
monochromatic
#212164 #303092 #4040C0 #6E6ECF #9C9CDE

Accessibility & contrast

On white

7.74
#4040C0 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.71
#4040C0 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040C0
7.74:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040C0#FFFFFF#000000##FFFFFF
##4040C01.007.742.717.74
#FFFFFF7.741.0021.001.00
#0000002.7121.001.0021.00
##FFFFFF7.741.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0058C4
Deuteranopia (green-blind)
#004DBE
Tritanopia (blue-blind)
#00627A
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #4040c0;
/* rgb */ color: rgb(64, 64, 192);
/* oklch */ color: oklch(45.7% 0.194 275.5);
Tailwind
colors: {
  custom: {
    50: '#8575d4',
    500: '#4040c0',
    950: '#000000',
  },
}
SCSS
$custom: #4040c0;
$custom-light: #8575d4;
$custom-dark: #000000;
JSON
{
  "hex": "#4040c0",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 192
  },
  "hsl": {
    "h": 240,
    "s": 50.394,
    "l": 50.196
  },
  "oklch": {
    "l": 0.45743,
    "c": 0.19422,
    "h": 275.5
  },
  "luminance": 0.08563
}

Semantic roles & 50–950 ramp

primary
#4040C0
secondary
#CBCB91
accent
#DA4EDA
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4040C0

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

Preview Lab → · Contrast checker → · Palette generator →

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