#040F2A#040F2A

#040F2A is a very dark, muted blue. Relative luminance 0.005; OKLCH L 17.7% C 0.058 H 263.0°. Best body text is #FFFFFF at 18.97:1 contrast (WCAG AA passes).

Color values

HEX#040F2A
RGBrgb(4, 15, 42)
HSLhsl(223, 83%, 9%)
HSVhsv(223, 90%, 16%)
CMYKcmyk(90.5%, 64.3%, 0%, 83.5%)
CIE-LABlab(4.83, 5.35, -19.05)
CIE-LCHlch(4.83, 19.79, 285.69°)
OKLaboklab(17.72% -0.0071 -0.0575)
OKLCHoklch(17.72% 0.058 263)
XYZxyz(0.6387, 0.5346, 2.2596)
Luminance0.0053 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F2A #2A1F04
analogous
#04222A #040F2A #0C042A
triadic
#040F2A #2A040F #0F2A04
tetradic
#040F2A #2A0422 #2A1F04 #042A0C
square
#040F2A #2A0422 #2A1F04 #042A0C
split-complementary
#040F2A #2A0C04 #222A04
monochromatic
#030A1C #030A1C #040F2A #092362 #0F379A

Accessibility & contrast

On white

18.97
#040F2A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F2A
18.97:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F2A#FFFFFF#000000##FFFFFF
##040F2A1.0018.971.1118.97
#FFFFFF18.971.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.971.0021.001.00

Color blindness preview

Protanopia (red-blind)
#02122B
Deuteranopia (green-blind)
#000F29
Tritanopia (blue-blind)
#00161A
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040f2a;
/* rgb */ color: rgb(4, 15, 42);
/* oklch */ color: oklch(17.7% 0.058 263.0);
Tailwind
colors: {
  custom: {
    50: '#494e63',
    500: '#040f2a',
    950: '#000000',
  },
}
SCSS
$custom: #040f2a;
$custom-light: #494e63;
$custom-dark: #000000;
JSON
{
  "hex": "#040f2a",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 42
  },
  "hsl": {
    "h": 222.632,
    "s": 82.609,
    "l": 9.02
  },
  "oklch": {
    "l": 0.17725,
    "c": 0.05797,
    "h": 263
  },
  "luminance": 0.00535
}

Semantic roles & 50–950 ramp

primary
#040F2A
secondary
#6D561D
accent
#BE2FF9
background
#F4F4F5
surface
#E7E7EA
border
#C3C3C6
text
#010105
muted
#777779

Preview Lab

Preview with #040F2A

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

Preview Lab → · Contrast checker → · Palette generator →

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