#040C46#040C46

#040C46 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 20.3% C 0.107 H 266.8°. Best body text is #FFFFFF at 18.32:1 contrast (WCAG AA passes).

Color values

HEX#040C46
RGBrgb(4, 12, 70)
HSLhsl(233, 89%, 15%)
HSVhsv(233, 94%, 27%)
CMYKcmyk(94.3%, 82.9%, 0%, 72.5%)
CIE-LABlab(6.60, 21.74, -36.57)
CIE-LCHlch(6.60, 42.55, 300.73°)
OKLaboklab(20.32% -0.0059 -0.1065)
OKLCHoklch(20.32% 0.107 266.8)
XYZxyz(1.2866, 0.7308, 5.8664)
Luminance0.0073 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C46 #463E04
analogous
#042D46 #040C46 #1D0446
triadic
#040C46 #46040C #0C4604
tetradic
#040C46 #46042D #463E04 #04461D
square
#040C46 #46042D #463E04 #04461D
split-complementary
#040C46 #461D04 #2D4604
monochromatic
#02051D #02051D #040C46 #071680 #0B20BA

Accessibility & contrast

On white

18.32
#040C46 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#040C46 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C46
18.32:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C46#FFFFFF#000000##FFFFFF
##040C461.0018.321.1518.32
#FFFFFF18.321.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.321.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001848
Deuteranopia (green-blind)
#001145
Tritanopia (blue-blind)
#001D28
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #040c46;
/* rgb */ color: rgb(4, 12, 70);
/* oklch */ color: oklch(20.3% 0.107 266.8);
Tailwind
colors: {
  custom: {
    50: '#544b7a',
    500: '#040c46',
    950: '#000000',
  },
}
SCSS
$custom: #040c46;
$custom-light: #544b7a;
$custom-dark: #000000;
JSON
{
  "hex": "#040c46",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 70
  },
  "hsl": {
    "h": 232.727,
    "s": 89.189,
    "l": 14.51
  },
  "oklch": {
    "l": 0.20315,
    "c": 0.10665,
    "h": 266.8
  },
  "luminance": 0.00731
}

Semantic roles & 50–950 ramp

primary
#040C46
secondary
#877A1F
accent
#E529FF
background
#F5F4F7
surface
#E9E7EE
border
#C5C3C9
text
#030109
muted
#78777B

Preview Lab

Preview with #040C46

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

Preview Lab → · Contrast checker → · Palette generator →

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