#040C36#040C36

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

Color values

HEX#040C36
RGBrgb(4, 12, 54)
HSLhsl(230, 86%, 11%)
HSVhsv(230, 93%, 21%)
CMYKcmyk(92.6%, 77.8%, 0%, 78.8%)
CIE-LABlab(5.01, 13.10, -27.67)
CIE-LCHlch(5.01, 30.62, 295.32°)
OKLaboklab(18.3% -0.0043 -0.0825)
OKLCHoklch(18.3% 0.083 267)
XYZxyz(0.8472, 0.5550, 3.5518)
Luminance0.0056 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C36 #362E04
analogous
#042536 #040C36 #150436
triadic
#040C36 #36040C #0C3604
tetradic
#040C36 #360425 #362E04 #043615
square
#040C36 #360425 #362E04 #043615
split-complementary
#040C36 #361504 #253604
monochromatic
#02061C #02061C #040C36 #08196F #0C25A8

Accessibility & contrast

On white

18.90
#040C36 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C36
18.90:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C36#FFFFFF#000000##FFFFFF
##040C361.0018.901.1118.90
#FFFFFF18.901.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.901.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001337
Deuteranopia (green-blind)
#000E35
Tritanopia (blue-blind)
#00171F
Achromatopsia (no color)
#111111

Design tokens & code

CSS
--color: #040c36;
/* rgb */ color: rgb(4, 12, 54);
/* oklch */ color: oklch(18.3% 0.083 267.0);
Tailwind
colors: {
  custom: {
    50: '#4d4b6d',
    500: '#040c36',
    950: '#000000',
  },
}
SCSS
$custom: #040c36;
$custom-light: #4d4b6d;
$custom-dark: #000000;
JSON
{
  "hex": "#040c36",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 54
  },
  "hsl": {
    "h": 230.4,
    "s": 86.207,
    "l": 11.373
  },
  "oklch": {
    "l": 0.183,
    "c": 0.08264,
    "h": 267
  },
  "luminance": 0.00555
}

Semantic roles & 50–950 ramp

primary
#040C36
secondary
#786A1E
accent
#DB2BFC
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#020107
muted
#78777A

Preview Lab

Preview with #040C36

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

Preview Lab → · Contrast checker → · Palette generator →

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