#040C3F#040C3F

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

Color values

HEX#040C3F
RGBrgb(4, 12, 63)
HSLhsl(232, 88%, 13%)
HSVhsv(232, 94%, 25%)
CMYKcmyk(93.7%, 81%, 0%, 75.3%)
CIE-LABlab(5.85, 18.18, -32.83)
CIE-LCHlch(5.85, 37.53, 298.97°)
OKLaboklab(19.41% -0.0051 -0.0963)
OKLCHoklch(19.41% 0.096 267)
XYZxyz(1.0784, 0.6475, 4.7698)
Luminance0.0065 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C3F #3F3704
analogous
#04293F #040C3F #19043F
triadic
#040C3F #3F040C #0C3F04
tetradic
#040C3F #3F0429 #3F3704 #043F19
square
#040C3F #3F0429 #3F3704 #043F19
split-complementary
#040C3F #3F1904 #293F04
monochromatic
#02051D #02051D #040C3F #081779 #0B22B2

Accessibility & contrast

On white

18.59
#040C3F on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C3F
18.59:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C3F#FFFFFF#000000##FFFFFF
##040C3F1.0018.591.1318.59
#FFFFFF18.591.0021.001.00
#0000001.1321.001.0021.00
##FFFFFF18.591.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001641
Deuteranopia (green-blind)
#00103E
Tritanopia (blue-blind)
#001B24
Achromatopsia (no color)
#131313

Design tokens & code

CSS
--color: #040c3f;
/* rgb */ color: rgb(4, 12, 63);
/* oklch */ color: oklch(19.4% 0.096 267.0);
Tailwind
colors: {
  custom: {
    50: '#514b75',
    500: '#040c3f',
    950: '#000000',
  },
}
SCSS
$custom: #040c3f;
$custom-light: #514b75;
$custom-dark: #000000;
JSON
{
  "hex": "#040c3f",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 63
  },
  "hsl": {
    "h": 231.864,
    "s": 88.06,
    "l": 13.137
  },
  "oklch": {
    "l": 0.19413,
    "c": 0.09645,
    "h": 267
  },
  "luminance": 0.00648
}

Semantic roles & 50–950 ramp

primary
#040C3F
secondary
#80731E
accent
#E12AFE
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#020108
muted
#78777B

Preview Lab

Preview with #040C3F

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

Preview Lab → · Contrast checker → · Palette generator →

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