#040C28#040C28

#040C28 is a very dark, muted blue. Relative luminance 0.004; OKLCH L 16.7% C 0.059 H 265.8°. Best body text is #FFFFFF at 19.29:1 contrast (WCAG AA passes).

Color values

HEX#040C28
RGBrgb(4, 12, 40)
HSLhsl(227, 82%, 9%)
HSVhsv(227, 90%, 16%)
CMYKcmyk(90%, 70%, 0%, 84.3%)
CIE-LABlab(3.99, 5.91, -18.85)
CIE-LCHlch(3.99, 19.75, 287.42°)
OKLaboklab(16.72% -0.0043 -0.0591)
OKLCHoklch(16.72% 0.059 265.8)
XYZxyz(0.5644, 0.4419, 2.0626)
Luminance0.0044 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C28 #282004
analogous
#041E28 #040C28 #0E0428
triadic
#040C28 #28040C #0C2804
tetradic
#040C28 #28041E #282004 #04280E
square
#040C28 #28041E #282004 #04280E
split-complementary
#040C28 #280E04 #1E2804
monochromatic
#03081C #03081C #040C28 #0A1D60 #0F2D97

Accessibility & contrast

On white

19.29
#040C28 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.09
#040C28 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C28
19.29:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C28#FFFFFF#000000##FFFFFF
##040C281.0019.291.0919.29
#FFFFFF19.291.0021.001.00
#0000001.0921.001.0021.00
##FFFFFF19.291.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001029
Deuteranopia (green-blind)
#000C27
Tritanopia (blue-blind)
#001318
Achromatopsia (no color)
#0E0E0E

Design tokens & code

CSS
--color: #040c28;
/* rgb */ color: rgb(4, 12, 40);
/* oklch */ color: oklch(16.7% 0.059 265.8);
Tailwind
colors: {
  custom: {
    50: '#494c62',
    500: '#040c28',
    950: '#000000',
  },
}
SCSS
$custom: #040c28;
$custom-light: #494c62;
$custom-dark: #000000;
JSON
{
  "hex": "#040c28",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 40
  },
  "hsl": {
    "h": 226.667,
    "s": 81.818,
    "l": 8.627
  },
  "oklch": {
    "l": 0.16721,
    "c": 0.05925,
    "h": 265.8
  },
  "luminance": 0.00442
}

Semantic roles & 50–950 ramp

primary
#040C28
secondary
#6B5A1D
accent
#CC30F8
background
#F4F4F5
surface
#E7E7EA
border
#C3C3C6
text
#010105
muted
#777779

Preview Lab

Preview with #040C28

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

Preview Lab → · Contrast checker → · Palette generator →

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