#040F2F#040F2F

#040F2F is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 18.2% C 0.067 H 264.4°. Best body text is #FFFFFF at 18.84:1 contrast (WCAG AA passes).

Color values

HEX#040F2F
RGBrgb(4, 15, 47)
HSLhsl(225, 84%, 10%)
HSVhsv(225, 91%, 18%)
CMYKcmyk(91.5%, 68.1%, 0%, 81.6%)
CIE-LABlab(5.17, 7.77, -22.25)
CIE-LCHlch(5.17, 23.57, 289.24°)
OKLaboklab(18.23% -0.0065 -0.0663)
OKLCHoklch(18.23% 0.067 264.4)
XYZxyz(0.7338, 0.5726, 2.7606)
Luminance0.0057 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F2F #2F2404
analogous
#04252F #040F2F #0E042F
triadic
#040F2F #2F040F #0F2F04
tetradic
#040F2F #2F0425 #2F2404 #042F0E
square
#040F2F #2F0425 #2F2404 #042F0E
split-complementary
#040F2F #2F0E04 #252F04
monochromatic
#02091C #02091C #040F2F #092167 #0E33A0

Accessibility & contrast

On white

18.84
#040F2F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.11
#040F2F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040F2F
18.84:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F2F#FFFFFF#000000##FFFFFF
##040F2F1.0018.841.1118.84
#FFFFFF18.841.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.841.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001330
Deuteranopia (green-blind)
#000F2E
Tritanopia (blue-blind)
#00171D
Achromatopsia (no color)
#111111

Design tokens & code

CSS
--color: #040f2f;
/* rgb */ color: rgb(4, 15, 47);
/* oklch */ color: oklch(18.2% 0.067 264.4);
Tailwind
colors: {
  custom: {
    50: '#4b4d68',
    500: '#040f2f',
    950: '#000000',
  },
}
SCSS
$custom: #040f2f;
$custom-light: #4b4d68;
$custom-dark: #000000;
JSON
{
  "hex": "#040f2f",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 47
  },
  "hsl": {
    "h": 224.651,
    "s": 84.314,
    "l": 10
  },
  "oklch": {
    "l": 0.18229,
    "c": 0.06663,
    "h": 264.4
  },
  "luminance": 0.00573
}

Semantic roles & 50–950 ramp

primary
#040F2F
secondary
#725C1D
accent
#C62DFB
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040F2F

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

Preview Lab → · Contrast checker → · Palette generator →

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