#4038D4#4038D4

#4038D4 is a mid, highly saturated blue. Relative luminance 0.087; OKLCH L 46.5% C 0.227 H 275.2°. Best body text is #FFFFFF at 7.68:1 contrast (WCAG AA passes).

Color values

HEX#4038D4
RGBrgb(64, 56, 212)
HSLhsl(243, 64%, 53%)
HSVhsv(243, 74%, 83%)
CMYKcmyk(69.8%, 73.6%, 0%, 16.9%)
CIE-LABlab(35.34, 51.33, -78.26)
CIE-LCHlch(35.34, 93.59, 303.26°)
OKLaboklab(46.47% 0.0206 -0.2263)
OKLCHoklch(46.47% 0.227 275.2)
XYZxyz(15.4083, 8.6703, 63.1361)
Luminance0.0867 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#4038D4 #CCD438
analogous
#387ED4 #4038D4 #8E38D4
triadic
#4038D4 #D44038 #38D440
tetradic
#4038D4 #D4387E #CCD438 #38D48E
square
#4038D4 #D4387E #CCD438 #38D48E
split-complementary
#4038D4 #D48E38 #7ED438
monochromatic
#1F1A78 #2C25AA #4038D4 #706ADF #A19DEA

Accessibility & contrast

On white

7.68
#4038D4 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.73
#4038D4 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #4038D4
7.68:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##4038D4#FFFFFF#000000##FFFFFF
##4038D41.007.682.737.68
#FFFFFF7.681.0021.001.00
#0000002.7321.001.0021.00
##FFFFFF7.681.0021.001.00

Color blindness preview

Protanopia (red-blind)
#005AD9
Deuteranopia (green-blind)
#004CD1
Tritanopia (blue-blind)
#006583
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #4038d4;
/* rgb */ color: rgb(64, 56, 212);
/* oklch */ color: oklch(46.5% 0.227 275.2);
Tailwind
colors: {
  custom: {
    50: '#8a71e3',
    500: '#4038d4',
    950: '#000000',
  },
}
SCSS
$custom: #4038d4;
$custom-light: #8a71e3;
$custom-dark: #000000;
JSON
{
  "hex": "#4038d4",
  "rgb": {
    "r": 64,
    "g": 56,
    "b": 212
  },
  "hsl": {
    "h": 243.077,
    "s": 64.463,
    "l": 52.549
  },
  "oklch": {
    "l": 0.46466,
    "c": 0.22719,
    "h": 275.2
  },
  "luminance": 0.08672
}

Semantic roles & 50–950 ramp

primary
#4038D4
secondary
#D2D692
accent
#E740DF
background
#F9F6FE
surface
#F2ECFC
border
#CCC7D5
text
#0D0816
muted
#7E7B84

Preview Lab

Preview with #4038D4

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

Preview Lab → · Contrast checker → · Palette generator →

#4038D4 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva