#4040C1#4040C1

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

Color values

HEX#4040C1
RGBrgb(64, 64, 193)
HSLhsl(240, 51%, 50%)
HSVhsv(240, 67%, 76%)
CMYKcmyk(66.8%, 66.8%, 0%, 24.3%)
CIE-LABlab(35.21, 40.58, -67.41)
CIE-LCHlch(35.21, 78.69, 301.04°)
OKLaboklab(45.83% 0.0186 -0.1946)
OKLCHoklch(45.83% 0.195 275.5)
XYZxyz(13.5702, 8.6058, 51.3877)
Luminance0.0861 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4040C1 #C1C140
analogous
#4080C1 #4040C1 #8040C1
triadic
#4040C1 #C14040 #40C140
tetradic
#4040C1 #C14080 #C1C140 #40C180
square
#4040C1 #C14080 #C1C140 #40C180
split-complementary
#4040C1 #C18040 #80C140
monochromatic
#212166 #303094 #4040C1 #6E6ED0 #9C9CDF

Accessibility & contrast

On white

7.72
#4040C1 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.72
#4040C1 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4040C1
7.72:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4040C1#FFFFFF#000000##FFFFFF
##4040C11.007.722.727.72
#FFFFFF7.721.0021.001.00
#0000002.7221.001.0021.00
##FFFFFF7.721.0021.001.00

Color blindness preview

Protanopia (red-blind)
#0059C5
Deuteranopia (green-blind)
#004DBF
Tritanopia (blue-blind)
#00627B
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #4040c1;
/* rgb */ color: rgb(64, 64, 193);
/* oklch */ color: oklch(45.8% 0.195 275.5);
Tailwind
colors: {
  custom: {
    50: '#8575d5',
    500: '#4040c1',
    950: '#000000',
  },
}
SCSS
$custom: #4040c1;
$custom-light: #8575d5;
$custom-dark: #000000;
JSON
{
  "hex": "#4040c1",
  "rgb": {
    "r": 64,
    "g": 64,
    "b": 193
  },
  "hsl": {
    "h": 240,
    "s": 50.988,
    "l": 50.392
  },
  "oklch": {
    "l": 0.45834,
    "c": 0.19549,
    "h": 275.5
  },
  "luminance": 0.08607
}

Semantic roles & 50–950 ramp

primary
#4040C1
secondary
#CBCB92
accent
#DA4DDA
background
#F8F7FD
surface
#F0EDFA
border
#CBC8D3
text
#0C0814
muted
#7D7B83

Preview Lab

Preview with #4040C1

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

Preview Lab → · Contrast checker → · Palette generator →

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