#040C2A#040C2A

#040C2A is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 16.9% C 0.063 H 266.2°. Best body text is #FFFFFF at 19.24:1 contrast (WCAG AA passes).

Color values

HEX#040C2A
RGBrgb(4, 12, 42)
HSLhsl(227, 83%, 9%)
HSVhsv(227, 90%, 16%)
CMYKcmyk(90.5%, 71.4%, 0%, 83.5%)
CIE-LABlab(4.12, 6.80, -20.17)
CIE-LCHlch(4.12, 21.28, 288.63°)
OKLaboklab(16.93% -0.0042 -0.0626)
OKLCHoklch(16.93% 0.063 266.2)
XYZxyz(0.5993, 0.4559, 2.2464)
Luminance0.0046 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C2A #2A2204
analogous
#041F2A #040C2A #0F042A
triadic
#040C2A #2A040C #0C2A04
tetradic
#040C2A #2A041F #2A2204 #042A0F
square
#040C2A #2A041F #2A2204 #042A0F
split-complementary
#040C2A #2A0F04 #1F2A04
monochromatic
#03081C #03081C #040C2A #091C62 #0F2C9A

Accessibility & contrast

On white

19.24
#040C2A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C2A
19.24:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C2A#FFFFFF#000000##FFFFFF
##040C2A1.0019.241.0919.24
#FFFFFF19.241.0021.001.00
#0000001.0921.001.0021.00
##FFFFFF19.241.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00102B
Deuteranopia (green-blind)
#000D29
Tritanopia (blue-blind)
#001319
Achromatopsia (no color)
#0E0E0E

Design tokens & code

CSS
--color: #040c2a;
/* rgb */ color: rgb(4, 12, 42);
/* oklch */ color: oklch(16.9% 0.063 266.2);
Tailwind
colors: {
  custom: {
    50: '#494c63',
    500: '#040c2a',
    950: '#000000',
  },
}
SCSS
$custom: #040c2a;
$custom-light: #494c63;
$custom-dark: #000000;
JSON
{
  "hex": "#040c2a",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 42
  },
  "hsl": {
    "h": 227.368,
    "s": 82.609,
    "l": 9.02
  },
  "oklch": {
    "l": 0.16932,
    "c": 0.06275,
    "h": 266.2
  },
  "luminance": 0.00456
}

Semantic roles & 50–950 ramp

primary
#040C2A
secondary
#6D5C1D
accent
#CE2FF9
background
#F4F4F5
surface
#E7E7EA
border
#C3C3C6
text
#010105
muted
#777779

Preview Lab

Preview with #040C2A

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

Preview Lab → · Contrast checker → · Palette generator →

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