#040D3F#040D3F

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

Color values

HEX#040D3F
RGBrgb(4, 13, 63)
HSLhsl(231, 88%, 13%)
HSVhsv(231, 94%, 25%)
CMYKcmyk(93.7%, 79.4%, 0%, 75.3%)
CIE-LABlab(6.07, 17.64, -32.47)
CIE-LCHlch(6.07, 36.95, 298.52°)
OKLaboklab(19.61% -0.0055 -0.095)
OKLCHoklch(19.61% 0.095 266.7)
XYZxyz(1.0909, 0.6724, 4.7740)
Luminance0.0067 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040D3F #3F3604
analogous
#042A3F #040D3F #18043F
triadic
#040D3F #3F040D #0D3F04
tetradic
#040D3F #3F042A #3F3604 #043F18
square
#040D3F #3F042A #3F3604 #043F18
split-complementary
#040D3F #3F1804 #2A3F04
monochromatic
#02061D #02061D #040D3F #081979 #0B25B2

Accessibility & contrast

On white

18.51
#040D3F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.13
#040D3F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040D3F
18.51:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040D3F#FFFFFF#000000##FFFFFF
##040D3F1.0018.511.1318.51
#FFFFFF18.511.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.511.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001641
Deuteranopia (green-blind)
#00113E
Tritanopia (blue-blind)
#001B24
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040d3f;
/* rgb */ color: rgb(4, 13, 63);
/* oklch */ color: oklch(19.6% 0.095 266.7);
Tailwind
colors: {
  custom: {
    50: '#514c75',
    500: '#040d3f',
    950: '#000000',
  },
}
SCSS
$custom: #040d3f;
$custom-light: #514c75;
$custom-dark: #000000;
JSON
{
  "hex": "#040d3f",
  "rgb": {
    "r": 4,
    "g": 13,
    "b": 63
  },
  "hsl": {
    "h": 230.847,
    "s": 88.06,
    "l": 13.137
  },
  "oklch": {
    "l": 0.19611,
    "c": 0.09517,
    "h": 266.7
  },
  "luminance": 0.00673
}

Semantic roles & 50–950 ramp

primary
#040D3F
secondary
#80711E
accent
#DE2AFE
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#020108
muted
#78777B

Preview Lab

Preview with #040D3F

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

Preview Lab → · Contrast checker → · Palette generator →

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