#040C41#040C41

#040C41 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 19.7% C 0.099 H 266.9°. Best body text is #FFFFFF at 18.52:1 contrast (WCAG AA passes).

Color values

HEX#040C41
RGBrgb(4, 12, 65)
HSLhsl(232, 88%, 14%)
HSVhsv(232, 94%, 25%)
CMYKcmyk(93.8%, 81.5%, 0%, 74.5%)
CIE-LABlab(6.05, 19.23, -33.92)
CIE-LCHlch(6.05, 39.00, 299.55°)
OKLaboklab(19.67% -0.0053 -0.0993)
OKLCHoklch(19.67% 0.099 266.9)
XYZxyz(1.1353, 0.6703, 5.0695)
Luminance0.0067 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C41 #413904
analogous
#042A41 #040C41 #1A0441
triadic
#040C41 #41040C #0C4104
tetradic
#040C41 #41042A #413904 #04411A
square
#040C41 #41042A #413904 #04411A
split-complementary
#040C41 #411A04 #2A4104
monochromatic
#02051D #02051D #040C41 #08177B #0B21B4

Accessibility & contrast

On white

18.52
#040C41 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.13
#040C41 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C41
18.52:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C41#FFFFFF#000000##FFFFFF
##040C411.0018.521.1318.52
#FFFFFF18.521.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.521.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001643
Deuteranopia (green-blind)
#001040
Tritanopia (blue-blind)
#001B25
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040c41;
/* rgb */ color: rgb(4, 12, 65);
/* oklch */ color: oklch(19.7% 0.099 266.9);
Tailwind
colors: {
  custom: {
    50: '#524b76',
    500: '#040c41',
    950: '#000000',
  },
}
SCSS
$custom: #040c41;
$custom-light: #524b76;
$custom-dark: #000000;
JSON
{
  "hex": "#040c41",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 65
  },
  "hsl": {
    "h": 232.131,
    "s": 88.406,
    "l": 13.529
  },
  "oklch": {
    "l": 0.19668,
    "c": 0.09942,
    "h": 266.9
  },
  "luminance": 0.0067
}

Semantic roles & 50–950 ramp

primary
#040C41
secondary
#82751F
accent
#E329FF
background
#F4F4F7
surface
#E8E7ED
border
#C4C3C8
text
#030108
muted
#78777B

Preview Lab

Preview with #040C41

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

Preview Lab → · Contrast checker → · Palette generator →

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