#040C2F#040C2F

#040C2F is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.5% C 0.071 H 266.7°. Best body text is #FFFFFF at 19.11:1 contrast (WCAG AA passes).

Color values

HEX#040C2F
RGBrgb(4, 12, 47)
HSLhsl(229, 84%, 10%)
HSVhsv(229, 91%, 18%)
CMYKcmyk(91.5%, 74.5%, 0%, 81.6%)
CIE-LABlab(4.46, 9.22, -23.38)
CIE-LCHlch(4.46, 25.14, 291.52°)
OKLaboklab(17.48% -0.004 -0.0711)
OKLCHoklch(17.48% 0.071 266.7)
XYZxyz(0.6945, 0.4939, 2.7475)
Luminance0.0049 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C2F #2F2704
analogous
#04222F #040C2F #11042F
triadic
#040C2F #2F040C #0C2F04
tetradic
#040C2F #2F0422 #2F2704 #042F11
square
#040C2F #2F0422 #2F2704 #042F11
split-complementary
#040C2F #2F1104 #222F04
monochromatic
#02071C #02071C #040C2F #091A67 #0E29A0

Accessibility & contrast

On white

19.11
#040C2F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.10
#040C2F on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C2F
19.11:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C2F#FFFFFF#000000##FFFFFF
##040C2F1.0019.111.1019.11
#FFFFFF19.111.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.111.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001230
Deuteranopia (green-blind)
#000D2E
Tritanopia (blue-blind)
#00151B
Achromatopsia (no color)
#0F0F0F

Design tokens & code

CSS
--color: #040c2f;
/* rgb */ color: rgb(4, 12, 47);
/* oklch */ color: oklch(17.5% 0.071 266.7);
Tailwind
colors: {
  custom: {
    50: '#4a4c68',
    500: '#040c2f',
    950: '#000000',
  },
}
SCSS
$custom: #040c2f;
$custom-light: #4a4c68;
$custom-dark: #000000;
JSON
{
  "hex": "#040c2f",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 47
  },
  "hsl": {
    "h": 228.837,
    "s": 84.314,
    "l": 10
  },
  "oklch": {
    "l": 0.17483,
    "c": 0.07127,
    "h": 266.7
  },
  "luminance": 0.00494
}

Semantic roles & 50–950 ramp

primary
#040C2F
secondary
#72621D
accent
#D42DFB
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040C2F

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

Preview Lab → · Contrast checker → · Palette generator →

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