#040212#040212

#040212 is a very dark, muted blue. Relative luminance 0.001; OKLCH L 10.8% C 0.043 H 286.5°. Best body text is #FFFFFF at 20.54:1 contrast (WCAG AA passes).

Color values

HEX#040212
RGBrgb(4, 2, 18)
HSLhsl(248, 80%, 4%)
HSVhsv(248, 89%, 7%)
CMYKcmyk(77.8%, 88.9%, 0%, 92.9%)
CIE-LABlab(1.02, 3.01, -6.60)
CIE-LCHlch(1.02, 7.26, 294.55°)
OKLaboklab(10.84% 0.0121 -0.0407)
OKLCHoklch(10.84% 0.043 286.5)
XYZxyz(0.1809, 0.1129, 0.5844)
Luminance0.0011 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040212 #101202
analogous
#020812 #040212 #0C0212
triadic
#040212 #120402 #021204
tetradic
#040212 #120208 #101202 #02120C
square
#040212 #120208 #101202 #02120C
split-complementary
#040212 #120C02 #081202
monochromatic
#06031C #06031C #06031C #100849 #1C0E80

Accessibility & contrast

On white

20.54
#040212 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.02
#040212 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040212
20.54:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040212#FFFFFF#000000##FFFFFF
##0402121.0020.541.0220.54
#FFFFFF20.541.0021.001.00
#0000001.0221.001.0021.00
##FFFFFF20.541.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000413
Deuteranopia (green-blind)
#000312
Tritanopia (blue-blind)
#010407
Achromatopsia (no color)
#040404

Design tokens & code

CSS
--color: #040212;
/* rgb */ color: rgb(4, 2, 18);
/* oklch */ color: oklch(10.8% 0.043 286.5);
Tailwind
colors: {
  custom: {
    50: '#48484f',
    500: '#040212',
    950: '#000000',
  },
}
SCSS
$custom: #040212;
$custom-light: #48484f;
$custom-dark: #000000;
JSON
{
  "hex": "#040212",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 18
  },
  "hsl": {
    "h": 247.5,
    "s": 80,
    "l": 3.922
  },
  "oklch": {
    "l": 0.10838,
    "c": 0.0425,
    "h": 286.5
  },
  "luminance": 0.00113
}

Semantic roles & 50–950 ramp

primary
#040212
secondary
#4F5719
accent
#F631DE
background
#F4F4F4
surface
#E6E6E7
border
#C2C2C3
text
#000002
muted
#777778

Preview Lab

Preview with #040212

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

Preview Lab → · Contrast checker → · Palette generator →

#040212 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva