#4040FF#4040FF

#4040FF is a mid, highly saturated blue. Relative luminance 0.120; OKLCH L 51.9% C 0.269 H 271.9°. Best body text is #FFFFFF at 6.18:1 contrast (WCAG AA passes).

Color values

HEX#4040FF
RGBrgb(64, 64, 255)
HSLhsl(240, 100%, 63%)
HSVhsv(240, 75%, 100%)
CMYKcmyk(74.9%, 74.9%, 0%, 0%)
CIE-LABlab(41.18, 60.51, -93.03)
CIE-LCHlch(41.18, 110.98, 303.04°)
OKLaboklab(51.88% 0.0091 -0.2693)
OKLCHoklch(51.88% 0.269 271.9)
XYZxyz(21.9917, 11.9744, 95.7406)
Luminance0.1198 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040FF #FFFF40
analogous
#409FFF #4040FF #9F40FF
triadic
#4040FF #FF4040 #40FF40
tetradic
#4040FF #FF409F #FFFF40 #40FF9F
square
#4040FF #FF409F #FFFF40 #40FF9F
split-complementary
#4040FF #FF9F40 #9FFF40
monochromatic
#0000C5 #0303FF #4040FF #7D7DFF #BABAFF

Accessibility & contrast

On white

6.18
#4040FF on #FFFFFF
AA ✓AA large ✓AAA ✗

On black

3.40
#4040FF on #000000
AA ✗AA large ✓AAA ✗

Best text color

#FFFFFF on #4040FF
6.18:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040FF#FFFFFF#000000##FFFFFF
##4040FF1.006.183.406.18
#FFFFFF6.181.0021.001.00
#0000003.4021.001.0021.00
##FFFFFF6.181.0021.001.00

Color blindness preview

Protanopia (red-blind)
#006AFF
Deuteranopia (green-blind)
#0057FC
Tritanopia (blue-blind)
#00799E
Achromatopsia (no color)
#616161

Design tokens & code

CSS
--color: #4040ff;
/* rgb */ color: rgb(64, 64, 255);
/* oklch */ color: oklch(51.9% 0.269 271.9);
Tailwind
colors: {
  custom: {
    50: '#9278ff',
    500: '#4040ff',
    950: '#000000',
  },
}
SCSS
$custom: #4040ff;
$custom-light: #9278ff;
$custom-dark: #000000;
JSON
{
  "hex": "#4040ff",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 255
  },
  "hsl": {
    "h": 240,
    "s": 100,
    "l": 62.549
  },
  "oklch": {
    "l": 0.5188,
    "c": 0.26944,
    "h": 271.9
  },
  "luminance": 0.11977
}

Semantic roles & 50–950 ramp

primary
#4040FF
secondary
#F0F0AB
accent
#E600E5
background
#FAF7FF
surface
#F4EDFF
border
#CEC8D7
text
#0F0918
muted
#7F7B86

Preview Lab

Preview with #4040FF

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

Preview Lab → · Contrast checker → · Palette generator →

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