#4040CB#4040CB

#4040CB is a mid, highly saturated blue. Relative luminance 0.091; OKLCH L 46.8% C 0.208 H 274.8°. Best body text is #FFFFFF at 7.46:1 contrast (WCAG AA passes).

Color values

HEX#4040CB
RGBrgb(64, 64, 203)
HSLhsl(240, 57%, 52%)
HSVhsv(240, 68%, 80%)
CMYKcmyk(68.5%, 68.5%, 0%, 20.4%)
CIE-LABlab(36.11, 43.91, -71.77)
CIE-LCHlch(36.11, 84.14, 301.46°)
OKLaboklab(46.76% 0.0174 -0.2074)
OKLCHoklch(46.76% 0.208 274.8)
XYZxyz(14.7237, 9.0672, 57.4625)
Luminance0.0907 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040CB #CBCB40
analogous
#4086CB #4040CB #8640CB
triadic
#4040CB #CB4040 #40CB40
tetradic
#4040CB #CB4086 #CBCB40 #40CB86
square
#4040CB #CB4086 #CBCB40 #40CB86
split-complementary
#4040CB #CB8640 #86CB40
monochromatic
#1F1F72 #2C2CA2 #4040CB #7070D8 #A0A0E5

Accessibility & contrast

On white

7.46
#4040CB on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.81
#4040CB on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040CB
7.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040CB#FFFFFF#000000##FFFFFF
##4040CB1.007.462.817.46
#FFFFFF7.461.0021.001.00
#0000002.8121.001.0021.00
##FFFFFF7.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BCF
Deuteranopia (green-blind)
#004EC8
Tritanopia (blue-blind)
#006680
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #4040cb;
/* rgb */ color: rgb(64, 64, 203);
/* oklch */ color: oklch(46.8% 0.208 274.8);
Tailwind
colors: {
  custom: {
    50: '#8776dc',
    500: '#4040cb',
    950: '#000000',
  },
}
SCSS
$custom: #4040cb;
$custom-light: #8776dc;
$custom-dark: #000000;
JSON
{
  "hex": "#4040cb",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 203
  },
  "hsl": {
    "h": 240,
    "s": 57.202,
    "l": 52.353
  },
  "oklch": {
    "l": 0.46759,
    "c": 0.20809,
    "h": 274.8
  },
  "luminance": 0.09069
}

Semantic roles & 50–950 ramp

primary
#4040CB
secondary
#D2D295
accent
#E047E0
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040CB

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

Preview Lab → · Contrast checker → · Palette generator →

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