#40508D#40508D

#40508D is a dark, moderate blue. Relative luminance 0.087; OKLCH L 44.8% C 0.102 H 270.8°. Best body text is #FFFFFF at 7.64:1 contrast (WCAG AA passes).

Color values

HEX#40508D
RGBrgb(64, 80, 141)
HSLhsl(228, 38%, 40%)
HSVhsv(228, 55%, 55%)
CMYKcmyk(54.6%, 43.3%, 0%, 44.7%)
CIE-LABlab(35.50, 12.40, -35.87)
CIE-LCHlch(35.50, 37.95, 289.07°)
OKLaboklab(44.85% 0.0014 -0.1018)
OKLCHoklch(44.85% 0.102 270.8)
XYZxyz(9.7892, 8.7497, 26.3672)
Luminance0.0875 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40508D #8D7D40
analogous
#40778D #40508D #56408D
triadic
#40508D #8D4050 #508D40
tetradic
#40508D #8D4077 #8D7D40 #408D56
square
#40508D #8D4077 #8D7D40 #408D56
split-complementary
#40508D #8D5640 #778D40
monochromatic
#1A2039 #2D3863 #40508D #576AB3 #8190C6

Accessibility & contrast

On white

7.64
#40508D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.75
#40508D on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40508D
7.64:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40508D#FFFFFF#000000##FFFFFF
##40508D1.007.642.757.64
#FFFFFF7.641.0021.001.00
#0000002.7521.001.0021.00
##FFFFFF7.641.0021.001.00

Color blindness preview

Protanopia (red-blind)
#37578F
Deuteranopia (green-blind)
#2E508C
Tritanopia (blue-blind)
#1A5D67
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #40508d;
/* rgb */ color: rgb(64, 80, 141);
/* oklch */ color: oklch(44.8% 0.102 270.8);
Tailwind
colors: {
  custom: {
    50: '#7b80af',
    500: '#40508d',
    950: '#000000',
  },
}
SCSS
$custom: #40508d;
$custom-light: #7b80af;
$custom-dark: #000000;
JSON
{
  "hex": "#40508d",
  "rgb": {
    "r": 64,
    "g": 80,
    "b": 141
  },
  "hsl": {
    "h": 227.532,
    "s": 37.561,
    "l": 40.196
  },
  "oklch": {
    "l": 0.44845,
    "c": 0.10182,
    "h": 270.8
  },
  "luminance": 0.0875
}

Semantic roles & 50–950 ramp

primary
#40508D
secondary
#B0A578
accent
#B65ACE
background
#F7F7FA
surface
#EEEEF4
border
#C9C9CE
text
#0A0A10
muted
#7C7C7F

Preview Lab

Preview with #40508D

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

Preview Lab → · Contrast checker → · Palette generator →

#40508D Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva