#040F2B#040F2B

#040F2B is a very dark, muted blue. Relative luminance 0.005; OKLCH L 17.8% C 0.060 H 263.3°. Best body text is #FFFFFF at 18.95:1 contrast (WCAG AA passes).

Color values

HEX#040F2B
RGBrgb(4, 15, 43)
HSLhsl(223, 83%, 9%)
HSVhsv(223, 91%, 17%)
CMYKcmyk(90.7%, 65.1%, 0%, 83.1%)
CIE-LABlab(4.89, 5.81, -19.70)
CIE-LCHlch(4.89, 20.54, 286.43°)
OKLaboklab(17.82% -0.0069 -0.0593)
OKLCHoklch(17.82% 0.06 263.3)
XYZxyz(0.6568, 0.5418, 2.3550)
Luminance0.0054 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F2B #2B2004
analogous
#04232B #040F2B #0D042B
triadic
#040F2B #2B040F #0F2B04
tetradic
#040F2B #2B0423 #2B2004 #042B0D
square
#040F2B #2B0423 #2B2004 #042B0D
split-complementary
#040F2B #2B0D04 #232B04
monochromatic
#030A1C #030A1C #040F2B #092363 #0E369B

Accessibility & contrast

On white

18.95
#040F2B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F2B
18.95:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F2B#FFFFFF#000000##FFFFFF
##040F2B1.0018.951.1118.95
#FFFFFF18.951.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.951.0021.001.00

Color blindness preview

Protanopia (red-blind)
#01132C
Deuteranopia (green-blind)
#000F2A
Tritanopia (blue-blind)
#00161B
Achromatopsia (no color)
#111111

Design tokens & code

CSS
--color: #040f2b;
/* rgb */ color: rgb(4, 15, 43);
/* oklch */ color: oklch(17.8% 0.060 263.3);
Tailwind
colors: {
  custom: {
    50: '#494d64',
    500: '#040f2b',
    950: '#000000',
  },
}
SCSS
$custom: #040f2b;
$custom-light: #494d64;
$custom-dark: #000000;
JSON
{
  "hex": "#040f2b",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 43
  },
  "hsl": {
    "h": 223.077,
    "s": 82.979,
    "l": 9.216
  },
  "oklch": {
    "l": 0.17823,
    "c": 0.05972,
    "h": 263.3
  },
  "luminance": 0.00542
}

Semantic roles & 50–950 ramp

primary
#040F2B
secondary
#6E571D
accent
#C02EF9
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010105
muted
#77777A

Preview Lab

Preview with #040F2B

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

Preview Lab → · Contrast checker → · Palette generator →

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