#040C18#040C18

#040C18 is a very dark, muted blue. Relative luminance 0.004; OKLCH L 15.3% C 0.030 H 254.8°. Best body text is #FFFFFF at 19.61:1 contrast (WCAG AA passes).

Color values

HEX#040C18
RGBrgb(4, 12, 24)
HSLhsl(216, 71%, 5%)
HSVhsv(216, 83%, 9%)
CMYKcmyk(83.3%, 50%, 0%, 90.6%)
CIE-LABlab(3.20, 0.38, -7.55)
CIE-LCHlch(3.20, 7.56, 272.88°)
OKLaboklab(15.26% -0.0078 -0.0287)
OKLCHoklch(15.26% 0.03 254.8)
XYZxyz(0.3464, 0.3547, 0.9142)
Luminance0.0036 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C18 #181004
analogous
#041618 #040C18 #060418
triadic
#040C18 #18040C #0C1804
tetradic
#040C18 #180416 #181004 #041806
square
#040C18 #180416 #181004 #041806
split-complementary
#040C18 #180604 #161804
monochromatic
#040D1A #040D1A #040D1A #0D264C #154081

Accessibility & contrast

On white

19.61
#040C18 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.07
#040C18 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C18
19.61:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C18#FFFFFF#000000##FFFFFF
##040C181.0019.611.0719.61
#FFFFFF19.611.0021.001.00
#0000001.0721.001.0021.00
##FFFFFF19.611.0021.001.00

Color blindness preview

Protanopia (red-blind)
#070D19
Deuteranopia (green-blind)
#050B18
Tritanopia (blue-blind)
#000F10
Achromatopsia (no color)
#0C0C0C

Design tokens & code

CSS
--color: #040c18;
/* rgb */ color: rgb(4, 12, 24);
/* oklch */ color: oklch(15.3% 0.030 254.8);
Tailwind
colors: {
  custom: {
    50: '#484c54',
    500: '#040c18',
    950: '#000000',
  },
}
SCSS
$custom: #040c18;
$custom-light: #484c54;
$custom-dark: #000000;
JSON
{
  "hex": "#040c18",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 24
  },
  "hsl": {
    "h": 216,
    "s": 71.429,
    "l": 5.49
  },
  "oklch": {
    "l": 0.15258,
    "c": 0.02975,
    "h": 254.8
  },
  "luminance": 0.00355
}

Semantic roles & 50–950 ramp

primary
#040C18
secondary
#5A421E
accent
#A63AEE
background
#F4F4F4
surface
#E6E7E7
border
#C2C3C3
text
#000102
muted
#777778

Preview Lab

Preview with #040C18

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

Preview Lab → · Contrast checker → · Palette generator →

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