#040C20#040C20

#040C20 is a very dark, muted blue. Relative luminance 0.004; OKLCH L 15.9% C 0.045 H 263.0°. Best body text is #FFFFFF at 19.47:1 contrast (WCAG AA passes).

Color values

HEX#040C20
RGBrgb(4, 12, 32)
HSLhsl(223, 78%, 7%)
HSVhsv(223, 88%, 13%)
CMYKcmyk(87.5%, 62.5%, 0%, 87.5%)
CIE-LABlab(3.55, 2.81, -13.36)
CIE-LCHlch(3.55, 13.65, 281.89°)
OKLaboklab(15.93% -0.0055 -0.0444)
OKLCHoklch(15.93% 0.045 263)
XYZxyz(0.4422, 0.3930, 1.4188)
Luminance0.0039 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C20 #201804
analogous
#041A20 #040C20 #0A0420
triadic
#040C20 #20040C #0C2004
tetradic
#040C20 #20041A #201804 #04200A
square
#040C20 #20041A #201804 #04200A
split-complementary
#040C20 #200A04 #1A2004
monochromatic
#030A1B #030A1B #040C20 #0B2056 #12358D

Accessibility & contrast

On white

19.47
#040C20 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C20
19.47:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C20#FFFFFF#000000##FFFFFF
##040C201.0019.471.0819.47
#FFFFFF19.471.0021.001.00
#0000001.0821.001.0021.00
##FFFFFF19.471.0021.001.00

Color blindness preview

Protanopia (red-blind)
#040E21
Deuteranopia (green-blind)
#010B20
Tritanopia (blue-blind)
#001114
Achromatopsia (no color)
#0D0D0D

Design tokens & code

CSS
--color: #040c20;
/* rgb */ color: rgb(4, 12, 32);
/* oklch */ color: oklch(15.9% 0.045 263.0);
Tailwind
colors: {
  custom: {
    50: '#484c5b',
    500: '#040c20',
    950: '#000000',
  },
}
SCSS
$custom: #040c20;
$custom-light: #484c5b;
$custom-dark: #000000;
JSON
{
  "hex": "#040c20",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 32
  },
  "hsl": {
    "h": 222.857,
    "s": 77.778,
    "l": 7.059
  },
  "oklch": {
    "l": 0.15934,
    "c": 0.04473,
    "h": 263
  },
  "luminance": 0.00393
}

Semantic roles & 50–950 ramp

primary
#040C20
secondary
#634F1D
accent
#BD34F4
background
#F4F4F5
surface
#E6E7E9
border
#C2C3C5
text
#000104
muted
#777779

Preview Lab

Preview with #040C20

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

Preview Lab → · Contrast checker → · Palette generator →

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