#4040CA#4040CA

#4040CA is a mid, highly saturated blue. Relative luminance 0.090; OKLCH L 46.7% C 0.207 H 274.9°. Best body text is #FFFFFF at 7.49:1 contrast (WCAG AA passes).

Color values

HEX#4040CA
RGBrgb(64, 64, 202)
HSLhsl(240, 57%, 52%)
HSVhsv(240, 68%, 79%)
CMYKcmyk(68.3%, 68.3%, 0%, 20.8%)
CIE-LABlab(36.02, 43.57, -71.34)
CIE-LCHlch(36.02, 83.60, 301.42°)
OKLaboklab(46.67% 0.0175 -0.2061)
OKLCHoklch(46.67% 0.207 274.9)
XYZxyz(14.6049, 9.0197, 56.8370)
Luminance0.0902 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040CA #CACA40
analogous
#4085CA #4040CA #8540CA
triadic
#4040CA #CA4040 #40CA40
tetradic
#4040CA #CA4085 #CACA40 #40CA85
square
#4040CA #CA4085 #CACA40 #40CA85
split-complementary
#4040CA #CA8540 #85CA40
monochromatic
#1F1F70 #2C2CA0 #4040CA #7070D7 #A0A0E5

Accessibility & contrast

On white

7.49
#4040CA on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.80
#4040CA on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040CA
7.49:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040CA#FFFFFF#000000##FFFFFF
##4040CA1.007.492.807.49
#FFFFFF7.491.0021.001.00
#0000002.8021.001.0021.00
##FFFFFF7.491.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005BCE
Deuteranopia (green-blind)
#004EC7
Tritanopia (blue-blind)
#006580
Achromatopsia (no color)
#555555

Design tokens & code

CSS
--color: #4040ca;
/* rgb */ color: rgb(64, 64, 202);
/* oklch */ color: oklch(46.7% 0.207 274.9);
Tailwind
colors: {
  custom: {
    50: '#8776db',
    500: '#4040ca',
    950: '#000000',
  },
}
SCSS
$custom: #4040ca;
$custom-light: #8776db;
$custom-dark: #000000;
JSON
{
  "hex": "#4040ca",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 202
  },
  "hsl": {
    "h": 240,
    "s": 56.557,
    "l": 52.157
  },
  "oklch": {
    "l": 0.46666,
    "c": 0.20684,
    "h": 274.9
  },
  "luminance": 0.09021
}

Semantic roles & 50–950 ramp

primary
#4040CA
secondary
#D1D195
accent
#E048E0
background
#F9F7FD
surface
#F1EDFB
border
#CBC8D4
text
#0D0815
muted
#7E7B83

Preview Lab

Preview with #4040CA

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

Preview Lab → · Contrast checker → · Palette generator →

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