#040C21#040C21

#040C21 is a very dark, muted blue. Relative luminance 0.004; OKLCH L 16.0% C 0.047 H 263.5°. Best body text is #FFFFFF at 19.45:1 contrast (WCAG AA passes).

Color values

HEX#040C21
RGBrgb(4, 12, 33)
HSLhsl(223, 78%, 7%)
HSVhsv(223, 88%, 13%)
CMYKcmyk(87.9%, 63.6%, 0%, 87.1%)
CIE-LABlab(3.60, 3.16, -14.06)
CIE-LCHlch(3.60, 14.41, 282.68°)
OKLaboklab(16.03% -0.0053 -0.0463)
OKLCHoklch(16.03% 0.047 263.5)
XYZxyz(0.4560, 0.3985, 1.4914)
Luminance0.0040 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C21 #211904
analogous
#041B21 #040C21 #0B0421
triadic
#040C21 #21040C #0C2104
tetradic
#040C21 #21041B #211904 #04210B
square
#040C21 #21041B #211904 #04210B
split-complementary
#040C21 #210B04 #1B2104
monochromatic
#030A1B #030A1B #040C21 #0B2058 #11348E

Accessibility & contrast

On white

19.45
#040C21 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.08
#040C21 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C21
19.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C21#FFFFFF#000000##FFFFFF
##040C211.0019.451.0819.45
#FFFFFF19.451.0021.001.00
#0000001.0821.001.0021.00
##FFFFFF19.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#030E22
Deuteranopia (green-blind)
#000C21
Tritanopia (blue-blind)
#001114
Achromatopsia (no color)
#0D0D0D

Design tokens & code

CSS
--color: #040c21;
/* rgb */ color: rgb(4, 12, 33);
/* oklch */ color: oklch(16.0% 0.047 263.5);
Tailwind
colors: {
  custom: {
    50: '#484c5c',
    500: '#040c21',
    950: '#000000',
  },
}
SCSS
$custom: #040c21;
$custom-light: #484c5c;
$custom-dark: #000000;
JSON
{
  "hex": "#040c21",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 33
  },
  "hsl": {
    "h": 223.448,
    "s": 78.378,
    "l": 7.255
  },
  "oklch": {
    "l": 0.16027,
    "c": 0.04659,
    "h": 263.5
  },
  "luminance": 0.00399
}

Semantic roles & 50–950 ramp

primary
#040C21
secondary
#64501D
accent
#BF33F5
background
#F4F4F5
surface
#E6E7E9
border
#C2C3C5
text
#000104
muted
#777779

Preview Lab

Preview with #040C21

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

Preview Lab → · Contrast checker → · Palette generator →

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