#040512#040512

#040512 is a very dark, muted blue. Relative luminance 0.002; OKLCH L 12.3% C 0.031 H 275.9°. Best body text is #FFFFFF at 20.28:1 contrast (WCAG AA passes).

Color values

HEX#040512
RGBrgb(4, 5, 18)
HSLhsl(236, 64%, 4%)
HSVhsv(236, 78%, 7%)
CMYKcmyk(77.8%, 72.2%, 0%, 92.9%)
CIE-LABlab(1.61, 1.82, -5.74)
CIE-LCHlch(1.61, 6.02, 287.54°)
OKLaboklab(12.31% 0.0032 -0.0313)
OKLCHoklch(12.31% 0.031 275.9)
XYZxyz(0.2135, 0.1780, 0.5953)
Luminance0.0018 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040512 #121104
analogous
#040C12 #040512 #0A0412
triadic
#040512 #120405 #051204
tetradic
#040512 #12040C #121104 #04120A
square
#040512 #12040C #121104 #04120A
split-complementary
#040512 #120A04 #0C1204
monochromatic
#060719 #060719 #060719 #0F1344 #1A2176

Accessibility & contrast

On white

20.28
#040512 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.04
#040512 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040512
20.28:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040512#FFFFFF#000000##FFFFFF
##0405121.0020.281.0420.28
#FFFFFF20.281.0021.001.00
#0000001.0421.001.0021.00
##FFFFFF20.281.0021.001.00

Color blindness preview

Protanopia (red-blind)
#020613
Deuteranopia (green-blind)
#010512
Tritanopia (blue-blind)
#01070A
Achromatopsia (no color)
#060606

Design tokens & code

CSS
--color: #040512;
/* rgb */ color: rgb(4, 5, 18);
/* oklch */ color: oklch(12.3% 0.031 275.9);
Tailwind
colors: {
  custom: {
    50: '#48494f',
    500: '#040512',
    950: '#000000',
  },
}
SCSS
$custom: #040512;
$custom-light: #48494f;
$custom-dark: #000000;
JSON
{
  "hex": "#040512",
  "rgb": {
    "r": 4,
    "g": 5,
    "b": 18
  },
  "hsl": {
    "h": 235.714,
    "s": 63.636,
    "l": 4.314
  },
  "oklch": {
    "l": 0.12306,
    "c": 0.03146,
    "h": 275.9
  },
  "luminance": 0.00178
}

Semantic roles & 50–950 ramp

primary
#040512
secondary
#524F20
accent
#DB41E7
background
#F4F4F4
surface
#E6E6E7
border
#C2C2C3
text
#000002
muted
#777778

Preview Lab

Preview with #040512

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

Preview Lab → · Contrast checker → · Palette generator →

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