#40508B#40508B

#40508B is a dark, moderate blue. Relative luminance 0.087; OKLCH L 44.7% C 0.099 H 270.6°. Best body text is #FFFFFF at 7.67:1 contrast (WCAG AA passes).

Color values

HEX#40508B
RGBrgb(64, 80, 139)
HSLhsl(227, 37%, 40%)
HSVhsv(227, 54%, 55%)
CMYKcmyk(54%, 42.4%, 0%, 45.5%)
CIE-LABlab(35.38, 11.72, -34.84)
CIE-LCHlch(35.38, 36.75, 288.59°)
OKLaboklab(44.72% 0.001 -0.0988)
OKLCHoklch(44.72% 0.099 270.6)
XYZxyz(9.6417, 8.6907, 25.5905)
Luminance0.0869 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40508B #8B7B40
analogous
#40768B #40508B #56408B
triadic
#40508B #8B4050 #508B40
tetradic
#40508B #8B4076 #8B7B40 #408B56
square
#40508B #8B4076 #8B7B40 #408B56
split-complementary
#40508B #8B5640 #768B40
monochromatic
#192037 #2D3861 #40508B #576AB2 #818FC5

Accessibility & contrast

On white

7.67
#40508B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.74
#40508B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40508B
7.67:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40508B#FFFFFF#000000##FFFFFF
##40508B1.007.672.747.67
#FFFFFF7.671.0021.001.00
#0000002.7421.001.0021.00
##FFFFFF7.671.0021.001.00

Color blindness preview

Protanopia (red-blind)
#38578D
Deuteranopia (green-blind)
#30508A
Tritanopia (blue-blind)
#1D5D66
Achromatopsia (no color)
#535353

Design tokens & code

CSS
--color: #40508b;
/* rgb */ color: rgb(64, 80, 139);
/* oklch */ color: oklch(44.7% 0.099 270.6);
Tailwind
colors: {
  custom: {
    50: '#7a80ad',
    500: '#40508b',
    950: '#000000',
  },
}
SCSS
$custom: #40508b;
$custom-light: #7a80ad;
$custom-dark: #000000;
JSON
{
  "hex": "#40508b",
  "rgb": {
    "r": 64,
    "g": 80,
    "b": 139
  },
  "hsl": {
    "h": 227.2,
    "s": 36.946,
    "l": 39.804
  },
  "oklch": {
    "l": 0.44718,
    "c": 0.09878,
    "h": 270.6
  },
  "luminance": 0.08691
}

Semantic roles & 50–950 ramp

primary
#40508B
secondary
#AFA378
accent
#B55BCD
background
#F7F7FA
surface
#EEEEF4
border
#C9C9CE
text
#0A0A10
muted
#7C7C7F

Preview Lab

Preview with #40508B

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

Preview Lab → · Contrast checker → · Palette generator →

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