#040C3B#040C3B

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

Color values

HEX#040C3B
RGBrgb(4, 12, 59)
HSLhsl(231, 87%, 12%)
HSVhsv(231, 93%, 23%)
CMYKcmyk(93.2%, 79.7%, 0%, 76.9%)
CIE-LABlab(5.46, 15.98, -30.59)
CIE-LCHlch(5.46, 34.51, 297.59°)
OKLaboklab(18.91% -0.0047 -0.0903)
OKLCHoklch(18.91% 0.09 267)
XYZxyz(0.9707, 0.6044, 4.2023)
Luminance0.0060 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C3B #3B3304
analogous
#04273B #040C3B #18043B
triadic
#040C3B #3B040C #0C3B04
tetradic
#040C3B #3B0427 #3B3304 #043B18
square
#040C3B #3B0427 #3B3304 #043B18
split-complementary
#040C3B #3B1804 #273B04
monochromatic
#02061D #02061D #040C3B #081874 #0C23AE

Accessibility & contrast

On white

18.73
#040C3B on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040C3B
18.73:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C3B#FFFFFF#000000##FFFFFF
##040C3B1.0018.731.1218.73
#FFFFFF18.731.0021.001.00
#0000001.1221.001.0021.00
##FFFFFF18.731.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00153C
Deuteranopia (green-blind)
#000F3A
Tritanopia (blue-blind)
#001922
Achromatopsia (no color)
#121212

Design tokens & code

CSS
--color: #040c3b;
/* rgb */ color: rgb(4, 12, 59);
/* oklch */ color: oklch(18.9% 0.090 267.0);
Tailwind
colors: {
  custom: {
    50: '#4f4b71',
    500: '#040c3b',
    950: '#000000',
  },
}
SCSS
$custom: #040c3b;
$custom-light: #4f4b71;
$custom-dark: #000000;
JSON
{
  "hex": "#040c3b",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 59
  },
  "hsl": {
    "h": 231.273,
    "s": 87.302,
    "l": 12.353
  },
  "oklch": {
    "l": 0.18911,
    "c": 0.09042,
    "h": 267
  },
  "luminance": 0.00605
}

Semantic roles & 50–950 ramp

primary
#040C3B
secondary
#7D6F1E
accent
#DF2AFD
background
#F4F4F6
surface
#E7E7EC
border
#C3C3C7
text
#020108
muted
#78777B

Preview Lab

Preview with #040C3B

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

Preview Lab → · Contrast checker → · Palette generator →

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