#040C2C#040C2C

#040C2C is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.1% C 0.066 H 266.5°. Best body text is #FFFFFF at 19.19:1 contrast (WCAG AA passes).

Color values

HEX#040C2C
RGBrgb(4, 12, 44)
HSLhsl(228, 83%, 9%)
HSVhsv(228, 91%, 17%)
CMYKcmyk(90.9%, 72.7%, 0%, 82.7%)
CIE-LABlab(4.25, 7.73, -21.47)
CIE-LCHlch(4.25, 22.82, 289.81°)
OKLaboklab(17.15% -0.0041 -0.0661)
OKLCHoklch(17.15% 0.066 266.5)
XYZxyz(0.6360, 0.4705, 2.4397)
Luminance0.0047 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C2C #2C2404
analogous
#04202C #040C2C #10042C
triadic
#040C2C #2C040C #0C2C04
tetradic
#040C2C #2C0420 #2C2404 #042C10
square
#040C2C #2C0420 #2C2404 #042C10
split-complementary
#040C2C #2C1004 #202C04
monochromatic
#03081C #03081C #040C2C #091B64 #0E2B9C

Accessibility & contrast

On white

19.19
#040C2C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.09
#040C2C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C2C
19.19:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C2C#FFFFFF#000000##FFFFFF
##040C2C1.0019.191.0919.19
#FFFFFF19.191.0021.001.00
#0000001.0921.001.0021.00
##FFFFFF19.191.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #040c2c;
/* rgb */ color: rgb(4, 12, 44);
/* oklch */ color: oklch(17.1% 0.066 266.5);
Tailwind
colors: {
  custom: {
    50: '#4a4c65',
    500: '#040c2c',
    950: '#000000',
  },
}
SCSS
$custom: #040c2c;
$custom-light: #4a4c65;
$custom-dark: #000000;
JSON
{
  "hex": "#040c2c",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 44
  },
  "hsl": {
    "h": 228,
    "s": 83.333,
    "l": 9.412
  },
  "oklch": {
    "l": 0.17149,
    "c": 0.0662,
    "h": 266.5
  },
  "luminance": 0.00471
}

Semantic roles & 50–950 ramp

primary
#040C2C
secondary
#6F5E1D
accent
#D12EFA
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010105
muted
#77777A

Preview Lab

Preview with #040C2C

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

Preview Lab → · Contrast checker → · Palette generator →

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