#040C2D#040C2D

#040C2D is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.3% C 0.068 H 266.6°. Best body text is #FFFFFF at 19.17:1 contrast (WCAG AA passes).

Color values

HEX#040C2D
RGBrgb(4, 12, 45)
HSLhsl(228, 84%, 10%)
HSVhsv(228, 91%, 18%)
CMYKcmyk(91.1%, 73.3%, 0%, 82.4%)
CIE-LABlab(4.32, 8.22, -22.11)
CIE-LCHlch(4.32, 23.59, 290.38°)
OKLaboklab(17.26% -0.0041 -0.0678)
OKLCHoklch(17.26% 0.068 266.6)
XYZxyz(0.6550, 0.4781, 2.5399)
Luminance0.0048 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C2D #2D2504
analogous
#04212D #040C2D #11042D
triadic
#040C2D #2D040C #0C2D04
tetradic
#040C2D #2D0421 #2D2504 #042D11
square
#040C2D #2D0421 #2D2504 #042D11
split-complementary
#040C2D #2D1104 #212D04
monochromatic
#02071C #02071C #040C2D #091B65 #0E2A9D

Accessibility & contrast

On white

19.17
#040C2D on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C2D
19.17:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C2D#FFFFFF#000000##FFFFFF
##040C2D1.0019.171.1019.17
#FFFFFF19.171.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.171.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00112E
Deuteranopia (green-blind)
#000D2C
Tritanopia (blue-blind)
#00141A
Achromatopsia (no color)
#0F0F0F

Design tokens & code

CSS
--color: #040c2d;
/* rgb */ color: rgb(4, 12, 45);
/* oklch */ color: oklch(17.3% 0.068 266.6);
Tailwind
colors: {
  custom: {
    50: '#4a4c66',
    500: '#040c2d',
    950: '#000000',
  },
}
SCSS
$custom: #040c2d;
$custom-light: #4a4c66;
$custom-dark: #000000;
JSON
{
  "hex": "#040c2d",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 45
  },
  "hsl": {
    "h": 228.293,
    "s": 83.673,
    "l": 9.608
  },
  "oklch": {
    "l": 0.17259,
    "c": 0.06789,
    "h": 266.6
  },
  "luminance": 0.00478
}

Semantic roles & 50–950 ramp

primary
#040C2D
secondary
#70601D
accent
#D22EFA
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040C2D

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

Preview Lab → · Contrast checker → · Palette generator →

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