#40478B#40478B

#40478B is a dark, moderate blue. Relative luminance 0.075; OKLCH L 42.8% C 0.111 H 276.2°. Best body text is #FFFFFF at 8.43:1 contrast (WCAG AA passes).

Color values

HEX#40478B
RGBrgb(64, 71, 139)
HSLhsl(234, 37%, 40%)
HSVhsv(234, 54%, 55%)
CMYKcmyk(54%, 48.9%, 0%, 45.5%)
CIE-LABlab(32.83, 17.64, -38.90)
CIE-LCHlch(32.83, 42.71, 294.39°)
OKLaboklab(42.77% 0.012 -0.1108)
OKLCHoklch(42.77% 0.111 276.2)
XYZxyz(9.0263, 7.4600, 25.3854)
Luminance0.0746 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#40478B #8B8440
analogous
#406D8B #40478B #5F408B
triadic
#40478B #8B4047 #478B40
tetradic
#40478B #8B406D #8B8440 #408B5F
square
#40478B #8B406D #8B8440 #408B5F
split-complementary
#40478B #8B5F40 #6D8B40
monochromatic
#191C37 #2D3261 #40478B #575FB2 #8187C5

Accessibility & contrast

On white

8.43
#40478B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

2.49
#40478B on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #40478B
8.43:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##40478B#FFFFFF#000000##FFFFFF
##40478B1.008.432.498.43
#FFFFFF8.431.0021.001.00
#0000002.4921.001.0021.00
##FFFFFF8.431.0021.001.00

Color blindness preview

Protanopia (red-blind)
#28508D
Deuteranopia (green-blind)
#204A8A
Tritanopia (blue-blind)
#1F5662
Achromatopsia (no color)
#4D4D4D

Design tokens & code

CSS
--color: #40478b;
/* rgb */ color: rgb(64, 71, 139);
/* oklch */ color: oklch(42.8% 0.111 276.2);
Tailwind
colors: {
  custom: {
    50: '#7b7aad',
    500: '#40478b',
    950: '#000000',
  },
}
SCSS
$custom: #40478b;
$custom-light: #7b7aad;
$custom-dark: #000000;
JSON
{
  "hex": "#40478b",
  "rgb": {
    "r": 64,
    "g": 71,
    "b": 139
  },
  "hsl": {
    "h": 234.4,
    "s": 36.946,
    "l": 39.804
  },
  "oklch": {
    "l": 0.42773,
    "c": 0.11143,
    "h": 276.2
  },
  "luminance": 0.07461
}

Semantic roles & 50–950 ramp

primary
#40478B
secondary
#AFAA78
accent
#C25BCD
background
#F7F7FA
surface
#EEEDF4
border
#C9C8CE
text
#0A0910
muted
#7C7B7F

Preview Lab

Preview with #40478B

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

Preview Lab → · Contrast checker → · Palette generator →

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