#040C3A#040C3A

#040C3A is a very dark, moderate blue. Relative luminance 0.006; OKLCH L 18.8% C 0.089 H 267.0°. Best body text is #FFFFFF at 18.77:1 contrast (WCAG AA passes).

Color values

HEX#040C3A
RGBrgb(4, 12, 58)
HSLhsl(231, 87%, 12%)
HSVhsv(231, 93%, 23%)
CMYKcmyk(93.1%, 79.3%, 0%, 77.3%)
CIE-LABlab(5.37, 15.42, -30.02)
CIE-LCHlch(5.37, 33.74, 297.19°)
OKLaboklab(18.79% -0.0046 -0.0888)
OKLCHoklch(18.79% 0.089 267)
XYZxyz(0.9450, 0.5941, 4.0670)
Luminance0.0059 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C3A #3A3204
analogous
#04273A #040C3A #17043A
triadic
#040C3A #3A040C #0C3A04
tetradic
#040C3A #3A0427 #3A3204 #043A17
square
#040C3A #3A0427 #3A3204 #043A17
split-complementary
#040C3A #3A1704 #273A04
monochromatic
#02061D #02061D #040C3A #081873 #0C24AD

Accessibility & contrast

On white

18.77
#040C3A on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.12
#040C3A on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C3A
18.77:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C3A#FFFFFF#000000##FFFFFF
##040C3A1.0018.771.1218.77
#FFFFFF18.771.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.771.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00143B
Deuteranopia (green-blind)
#000F39
Tritanopia (blue-blind)
#001921
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040c3a;
/* rgb */ color: rgb(4, 12, 58);
/* oklch */ color: oklch(18.8% 0.089 267.0);
Tailwind
colors: {
  custom: {
    50: '#4f4b71',
    500: '#040c3a',
    950: '#000000',
  },
}
SCSS
$custom: #040c3a;
$custom-light: #4f4b71;
$custom-dark: #000000;
JSON
{
  "hex": "#040c3a",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 58
  },
  "hsl": {
    "h": 231.111,
    "s": 87.097,
    "l": 12.157
  },
  "oklch": {
    "l": 0.18787,
    "c": 0.08889,
    "h": 267
  },
  "luminance": 0.00594
}

Semantic roles & 50–950 ramp

primary
#040C3A
secondary
#7C6E1E
accent
#DE2BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040C3A

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

Preview Lab → · Contrast checker → · Palette generator →

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