#040E2F#040E2F

#040E2F is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 18.0% C 0.068 H 265.2°. Best body text is #FFFFFF at 18.94:1 contrast (WCAG AA passes).

Color values

HEX#040E2F
RGBrgb(4, 14, 47)
HSLhsl(226, 84%, 10%)
HSVhsv(226, 91%, 18%)
CMYKcmyk(91.5%, 70.2%, 0%, 81.6%)
CIE-LABlab(4.92, 8.27, -22.65)
CIE-LCHlch(4.92, 24.11, 290.07°)
OKLaboklab(17.97% -0.0057 -0.0679)
OKLCHoklch(17.97% 0.068 265.2)
XYZxyz(0.7200, 0.5450, 2.7560)
Luminance0.0054 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040E2F #2F2504
analogous
#04232F #040E2F #10042F
triadic
#040E2F #2F040E #0E2F04
tetradic
#040E2F #2F0423 #2F2504 #042F10
square
#040E2F #2F0423 #2F2504 #042F10
split-complementary
#040E2F #2F1004 #232F04
monochromatic
#02081C #02081C #040E2F #091F67 #0E30A0

Accessibility & contrast

On white

18.94
#040E2F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040E2F
18.94:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040E2F#FFFFFF#000000##FFFFFF
##040E2F1.0018.941.1118.94
#FFFFFF18.941.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.941.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #040e2f;
/* rgb */ color: rgb(4, 14, 47);
/* oklch */ color: oklch(18.0% 0.068 265.2);
Tailwind
colors: {
  custom: {
    50: '#4a4d68',
    500: '#040e2f',
    950: '#000000',
  },
}
SCSS
$custom: #040e2f;
$custom-light: #4a4d68;
$custom-dark: #000000;
JSON
{
  "hex": "#040e2f",
  "rgb": {
    "r": 4,
    "g": 14,
    "b": 47
  },
  "hsl": {
    "h": 226.047,
    "s": 84.314,
    "l": 10
  },
  "oklch": {
    "l": 0.17975,
    "c": 0.06819,
    "h": 265.2
  },
  "luminance": 0.00545
}

Semantic roles & 50–950 ramp

primary
#040E2F
secondary
#725E1D
accent
#CB2DFB
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040E2F

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

Preview Lab → · Contrast checker → · Palette generator →

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