#040D40#040D40

#040D40 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 19.7% C 0.097 H 266.7°. Best body text is #FFFFFF at 18.47:1 contrast (WCAG AA passes).

Color values

HEX#040D40
RGBrgb(4, 13, 64)
HSLhsl(231, 88%, 13%)
HSVhsv(231, 94%, 25%)
CMYKcmyk(93.8%, 79.7%, 0%, 74.9%)
CIE-LABlab(6.18, 18.16, -33.01)
CIE-LCHlch(6.18, 37.68, 298.82°)
OKLaboklab(19.74% -0.0056 -0.0965)
OKLCHoklch(19.74% 0.097 266.7)
XYZxyz(1.1191, 0.6837, 4.9225)
Luminance0.0068 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040D40 #403704
analogous
#042B40 #040D40 #190440
triadic
#040D40 #40040D #0D4004
tetradic
#040D40 #40042B #403704 #044019
square
#040D40 #40042B #403704 #044019
split-complementary
#040D40 #401904 #2B4004
monochromatic
#02061D #02061D #040D40 #08197A #0B24B3

Accessibility & contrast

On white

18.47
#040D40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.14
#040D40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040D40
18.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040D40#FFFFFF#000000##FFFFFF
##040D401.0018.471.1418.47
#FFFFFF18.471.0021.001.00
#0000001.1421.001.0021.00
##FFFFFF18.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001742
Deuteranopia (green-blind)
#00113F
Tritanopia (blue-blind)
#001B25
Achromatopsia (no color)
#141414

Design tokens & code

CSS
--color: #040d40;
/* rgb */ color: rgb(4, 13, 64);
/* oklch */ color: oklch(19.7% 0.097 266.7);
Tailwind
colors: {
  custom: {
    50: '#514c75',
    500: '#040d40',
    950: '#000000',
  },
}
SCSS
$custom: #040d40;
$custom-light: #514c75;
$custom-dark: #000000;
JSON
{
  "hex": "#040d40",
  "rgb": {
    "r": 4,
    "g": 13,
    "b": 64
  },
  "hsl": {
    "h": 231,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.19736,
    "c": 0.09667,
    "h": 266.7
  },
  "luminance": 0.00684
}

Semantic roles & 50–950 ramp

primary
#040D40
secondary
#81721F
accent
#DE29FE
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#030108
muted
#78777B

Preview Lab

Preview with #040D40

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

Preview Lab → · Contrast checker → · Palette generator →

#040D40 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva