#040C31#040C31

#040C31 is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.7% C 0.075 H 266.9°. Best body text is #FFFFFF at 19.05:1 contrast (WCAG AA passes).

Color values

HEX#040C31
RGBrgb(4, 12, 49)
HSLhsl(229, 85%, 10%)
HSVhsv(229, 92%, 19%)
CMYKcmyk(91.8%, 75.5%, 0%, 80.8%)
CIE-LABlab(4.61, 10.26, -24.63)
CIE-LCHlch(4.61, 26.69, 292.62°)
OKLaboklab(17.71% -0.0041 -0.0745)
OKLCHoklch(17.71% 0.075 266.9)
XYZxyz(0.7357, 0.5104, 2.9649)
Luminance0.0051 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040C31 #312904
analogous
#042231 #040C31 #120431
triadic
#040C31 #31040C #0C3104
tetradic
#040C31 #310422 #312904 #043112
square
#040C31 #310422 #312904 #043112
split-complementary
#040C31 #311204 #223104
monochromatic
#02071C #02071C #040C31 #091A6A #0D28A2

Accessibility & contrast

On white

19.05
#040C31 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.10
#040C31 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040C31
19.05:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040C31#FFFFFF#000000##FFFFFF
##040C311.0019.051.1019.05
#FFFFFF19.051.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.051.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001232
Deuteranopia (green-blind)
#000E30
Tritanopia (blue-blind)
#00161C
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040c31;
/* rgb */ color: rgb(4, 12, 49);
/* oklch */ color: oklch(17.7% 0.075 266.9);
Tailwind
colors: {
  custom: {
    50: '#4b4c69',
    500: '#040c31',
    950: '#000000',
  },
}
SCSS
$custom: #040c31;
$custom-light: #4b4c69;
$custom-dark: #000000;
JSON
{
  "hex": "#040c31",
  "rgb": {
    "r": 4,
    "g": 12,
    "b": 49
  },
  "hsl": {
    "h": 229.333,
    "s": 84.906,
    "l": 10.392
  },
  "oklch": {
    "l": 0.17711,
    "c": 0.07457,
    "h": 266.9
  },
  "luminance": 0.00511
}

Semantic roles & 50–950 ramp

primary
#040C31
secondary
#73641D
accent
#D62DFB
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010106
muted
#77777A

Preview Lab

Preview with #040C31

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

Preview Lab → · Contrast checker → · Palette generator →

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