#040C39#040C39

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

Color values

HEX#040C39
RGBrgb(4, 12, 57)
HSLhsl(231, 87%, 12%)
HSVhsv(231, 93%, 22%)
CMYKcmyk(93%, 78.9%, 0%, 77.6%)
CIE-LABlab(5.28, 14.84, -29.44)
CIE-LCHlch(5.28, 32.97, 296.76°)
OKLaboklab(18.66% -0.0045 -0.0872)
OKLCHoklch(18.66% 0.087 267)
XYZxyz(0.9198, 0.5841, 3.9344)
Luminance0.0058 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C39 #393104
analogous
#042739 #040C39 #170439
triadic
#040C39 #39040C #0C3904
tetradic
#040C39 #390427 #393104 #043917
square
#040C39 #390427 #393104 #043917
split-complementary
#040C39 #391704 #273904
monochromatic
#02061D #02061D #040C39 #081872 #0C24AB

Accessibility & contrast

On white

18.80
#040C39 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C39
18.80:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C39#FFFFFF#000000##FFFFFF
##040C391.0018.801.1218.80
#FFFFFF18.801.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.801.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00143A
Deuteranopia (green-blind)
#000F38
Tritanopia (blue-blind)
#001821
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040c39;
/* rgb */ color: rgb(4, 12, 57);
/* oklch */ color: oklch(18.7% 0.087 267.0);
Tailwind
colors: {
  custom: {
    50: '#4e4b70',
    500: '#040c39',
    950: '#000000',
  },
}
SCSS
$custom: #040c39;
$custom-light: #4e4b70;
$custom-dark: #000000;
JSON
{
  "hex": "#040c39",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 57
  },
  "hsl": {
    "h": 230.943,
    "s": 86.885,
    "l": 11.961
  },
  "oklch": {
    "l": 0.18664,
    "c": 0.08735,
    "h": 267
  },
  "luminance": 0.00584
}

Semantic roles & 50–950 ramp

primary
#040C39
secondary
#7B6D1E
accent
#DD2BFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020107
muted
#78777A

Preview Lab

Preview with #040C39

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

Preview Lab → · Contrast checker → · Palette generator →

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