#040F40#040F40

#040F40 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 20.1% C 0.094 H 266.0°. Best body text is #FFFFFF at 18.30:1 contrast (WCAG AA passes).

Color values

HEX#040F40
RGBrgb(4, 15, 64)
HSLhsl(229, 88%, 13%)
HSVhsv(229, 94%, 25%)
CMYKcmyk(93.8%, 76.6%, 0%, 74.9%)
CIE-LABlab(6.66, 16.97, -32.22)
CIE-LCHlch(6.66, 36.42, 297.78°)
OKLaboklab(20.15% -0.0065 -0.0938)
OKLCHoklch(20.15% 0.094 266)
XYZxyz(1.1460, 0.7375, 4.9314)
Luminance0.0074 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F40 #403504
analogous
#042D40 #040F40 #170440
triadic
#040F40 #40040F #0F4004
tetradic
#040F40 #40042D #403504 #044017
square
#040F40 #40042D #403504 #044017
split-complementary
#040F40 #401704 #2D4004
monochromatic
#02071D #02071D #040F40 #081C7A #0B2AB3

Accessibility & contrast

On white

18.30
#040F40 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#040F40 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040F40
18.30:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F40#FFFFFF#000000##FFFFFF
##040F401.0018.301.1518.30
#FFFFFF18.301.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.301.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001842
Deuteranopia (green-blind)
#00123F
Tritanopia (blue-blind)
#001C25
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #040f40;
/* rgb */ color: rgb(4, 15, 64);
/* oklch */ color: oklch(20.1% 0.094 266.0);
Tailwind
colors: {
  custom: {
    50: '#514d75',
    500: '#040f40',
    950: '#000000',
  },
}
SCSS
$custom: #040f40;
$custom-light: #514d75;
$custom-dark: #000000;
JSON
{
  "hex": "#040f40",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 64
  },
  "hsl": {
    "h": 229,
    "s": 88.235,
    "l": 13.333
  },
  "oklch": {
    "l": 0.20145,
    "c": 0.09402,
    "h": 266
  },
  "luminance": 0.00738
}

Semantic roles & 50–950 ramp

primary
#040F40
secondary
#816F1F
accent
#D729FE
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#030108
muted
#78777B

Preview Lab

Preview with #040F40

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

Preview Lab → · Contrast checker → · Palette generator →

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