#040C1C#040C1C

#040C1C is a very dark, muted blue. Relative luminance 0.004; OKLCH L 15.6% C 0.037 H 260.0°. Best body text is #FFFFFF at 19.54:1 contrast (WCAG AA passes).

Color values

HEX#040C1C
RGBrgb(4, 12, 28)
HSLhsl(220, 75%, 6%)
HSVhsv(220, 86%, 11%)
CMYKcmyk(85.7%, 57.1%, 0%, 89%)
CIE-LABlab(3.37, 1.51, -10.49)
CIE-LCHlch(3.37, 10.60, 278.21°)
OKLaboklab(15.58% -0.0065 -0.0367)
OKLCHoklch(15.58% 0.037 260)
XYZxyz(0.3911, 0.3726, 1.1497)
Luminance0.0037 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C1C #1C1404
analogous
#04181C #040C1C #08041C
triadic
#040C1C #1C040C #0C1C04
tetradic
#040C1C #1C0418 #1C1404 #041C08
square
#040C1C #1C0418 #1C1404 #041C08
split-complementary
#040C1C #1C0804 #181C04
monochromatic
#040B1B #040B1B #040C1C #0C2352 #133A87

Accessibility & contrast

On white

19.54
#040C1C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C1C
19.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C1C#FFFFFF#000000##FFFFFF
##040C1C1.0019.541.0719.54
#FFFFFF19.541.0021.001.00
#0000001.0721.001.0021.00
##FFFFFF19.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#060D1D
Deuteranopia (green-blind)
#030B1C
Tritanopia (blue-blind)
#001012
Achromatopsia (no color)
#0C0C0C

Design tokens & code

CSS
--color: #040c1c;
/* rgb */ color: rgb(4, 12, 28);
/* oklch */ color: oklch(15.6% 0.037 260.0);
Tailwind
colors: {
  custom: {
    50: '#484c58',
    500: '#040c1c',
    950: '#000000',
  },
}
SCSS
$custom: #040c1c;
$custom-light: #484c58;
$custom-dark: #000000;
JSON
{
  "hex": "#040c1c",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 28
  },
  "hsl": {
    "h": 220,
    "s": 75,
    "l": 6.275
  },
  "oklch": {
    "l": 0.15581,
    "c": 0.03723,
    "h": 260
  },
  "luminance": 0.00373
}

Semantic roles & 50–950 ramp

primary
#040C1C
secondary
#5E491D
accent
#B336F2
background
#F4F4F5
surface
#E6E7E9
border
#C2C3C5
text
#000103
muted
#777778

Preview Lab

Preview with #040C1C

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

Preview Lab → · Contrast checker → · Palette generator →

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