#040F2E#040F2E

#040F2E is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 18.1% C 0.065 H 264.2°. Best body text is #FFFFFF at 18.87:1 contrast (WCAG AA passes).

Color values

HEX#040F2E
RGBrgb(4, 15, 46)
HSLhsl(224, 84%, 10%)
HSVhsv(224, 91%, 18%)
CMYKcmyk(91.3%, 67.4%, 0%, 82%)
CIE-LABlab(5.10, 7.26, -21.62)
CIE-LCHlch(5.10, 22.81, 288.56°)
OKLaboklab(18.13% -0.0066 -0.0646)
OKLCHoklch(18.13% 0.065 264.2)
XYZxyz(0.7139, 0.5646, 2.6556)
Luminance0.0056 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F2E #2E2304
analogous
#04242E #040F2E #0E042E
triadic
#040F2E #2E040F #0F2E04
tetradic
#040F2E #2E0424 #2E2304 #042E0E
square
#040F2E #2E0424 #2E2304 #042E0E
split-complementary
#040F2E #2E0E04 #242E04
monochromatic
#02091C #02091C #040F2E #092166 #0E349F

Accessibility & contrast

On white

18.87
#040F2E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F2E
18.87:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F2E#FFFFFF#000000##FFFFFF
##040F2E1.0018.871.1118.87
#FFFFFF18.871.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.871.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00132F
Deuteranopia (green-blind)
#000F2D
Tritanopia (blue-blind)
#00171C
Achromatopsia (no color)
#111111

Design tokens & code

CSS
--color: #040f2e;
/* rgb */ color: rgb(4, 15, 46);
/* oklch */ color: oklch(18.1% 0.065 264.2);
Tailwind
colors: {
  custom: {
    50: '#4a4d67',
    500: '#040f2e',
    950: '#000000',
  },
}
SCSS
$custom: #040f2e;
$custom-light: #4a4d67;
$custom-dark: #000000;
JSON
{
  "hex": "#040f2e",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 46
  },
  "hsl": {
    "h": 224.286,
    "s": 84,
    "l": 9.804
  },
  "oklch": {
    "l": 0.18126,
    "c": 0.06493,
    "h": 264.2
  },
  "luminance": 0.00565
}

Semantic roles & 50–950 ramp

primary
#040F2E
secondary
#715B1D
accent
#C52EFA
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040F2E

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

Preview Lab → · Contrast checker → · Palette generator →

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