#040C34#040C34

#040C34 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 18.1% C 0.079 H 267.0°. Best body text is #FFFFFF at 18.96:1 contrast (WCAG AA passes).

Color values

HEX#040C34
RGBrgb(4, 12, 52)
HSLhsl(230, 86%, 11%)
HSVhsv(230, 92%, 20%)
CMYKcmyk(92.3%, 76.9%, 0%, 79.6%)
CIE-LABlab(4.85, 11.93, -26.47)
CIE-LCHlch(4.85, 29.04, 294.25°)
OKLaboklab(18.06% -0.0042 -0.0793)
OKLCHoklch(18.06% 0.079 267)
XYZxyz(0.8012, 0.5366, 3.3095)
Luminance0.0054 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C34 #342C04
analogous
#042434 #040C34 #140434
triadic
#040C34 #34040C #0C3404
tetradic
#040C34 #340424 #342C04 #043414
square
#040C34 #340424 #342C04 #043414
split-complementary
#040C34 #341404 #243404
monochromatic
#02071C #02071C #040C34 #08196D #0D26A6

Accessibility & contrast

On white

18.96
#040C34 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.11
#040C34 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C34
18.96:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C34#FFFFFF#000000##FFFFFF
##040C341.0018.961.1118.96
#FFFFFF18.961.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.961.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001335
Deuteranopia (green-blind)
#000E33
Tritanopia (blue-blind)
#00171E
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040c34;
/* rgb */ color: rgb(4, 12, 52);
/* oklch */ color: oklch(18.1% 0.079 267.0);
Tailwind
colors: {
  custom: {
    50: '#4c4c6c',
    500: '#040c34',
    950: '#000000',
  },
}
SCSS
$custom: #040c34;
$custom-light: #4c4c6c;
$custom-dark: #000000;
JSON
{
  "hex": "#040c34",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 52
  },
  "hsl": {
    "h": 230,
    "s": 85.714,
    "l": 10.98
  },
  "oklch": {
    "l": 0.18062,
    "c": 0.07945,
    "h": 267
  },
  "luminance": 0.00537
}

Semantic roles & 50–950 ramp

primary
#040C34
secondary
#76671E
accent
#D92CFC
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010107
muted
#77777A

Preview Lab

Preview with #040C34

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

Preview Lab → · Contrast checker → · Palette generator →

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