#040C2E#040C2E

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

Color values

HEX#040C2E
RGBrgb(4, 12, 46)
HSLhsl(229, 84%, 10%)
HSVhsv(229, 91%, 18%)
CMYKcmyk(91.3%, 73.9%, 0%, 82%)
CIE-LABlab(4.39, 8.71, -22.75)
CIE-LCHlch(4.39, 24.36, 290.95°)
OKLaboklab(17.37% -0.004 -0.0695)
OKLCHoklch(17.37% 0.07 266.7)
XYZxyz(0.6745, 0.4859, 2.6425)
Luminance0.0049 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C2E #2E2604
analogous
#04212E #040C2E #11042E
triadic
#040C2E #2E040C #0C2E04
tetradic
#040C2E #2E0421 #2E2604 #042E11
square
#040C2E #2E0421 #2E2604 #042E11
split-complementary
#040C2E #2E1104 #212E04
monochromatic
#02071C #02071C #040C2E #091B66 #0E299F

Accessibility & contrast

On white

19.14
#040C2E on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C2E
19.14:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C2E#FFFFFF#000000##FFFFFF
##040C2E1.0019.141.1019.14
#FFFFFF19.141.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.141.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00112F
Deuteranopia (green-blind)
#000D2D
Tritanopia (blue-blind)
#00151B
Achromatopsia (no color)
#0F0F0F

Design tokens & code

CSS
--color: #040c2e;
/* rgb */ color: rgb(4, 12, 46);
/* oklch */ color: oklch(17.4% 0.070 266.7);
Tailwind
colors: {
  custom: {
    50: '#4a4c67',
    500: '#040c2e',
    950: '#000000',
  },
}
SCSS
$custom: #040c2e;
$custom-light: #4a4c67;
$custom-dark: #000000;
JSON
{
  "hex": "#040c2e",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 46
  },
  "hsl": {
    "h": 228.571,
    "s": 84,
    "l": 9.804
  },
  "oklch": {
    "l": 0.17371,
    "c": 0.06959,
    "h": 266.7
  },
  "luminance": 0.00486
}

Semantic roles & 50–950 ramp

primary
#040C2E
secondary
#71611D
accent
#D32EFA
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040C2E

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

Preview Lab → · Contrast checker → · Palette generator →

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