#040F27#040F27

#040F27 is a very dark, muted blue. Relative luminance 0.005; OKLCH L 17.4% C 0.053 H 261.7°. Best body text is #FFFFFF at 19.04:1 contrast (WCAG AA passes).

Color values

HEX#040F27
RGBrgb(4, 15, 39)
HSLhsl(221, 81%, 8%)
HSVhsv(221, 90%, 15%)
CMYKcmyk(89.7%, 61.5%, 0%, 84.7%)
CIE-LABlab(4.64, 4.04, -17.07)
CIE-LCHlch(4.64, 17.54, 283.31°)
OKLaboklab(17.44% -0.0076 -0.0521)
OKLCHoklch(17.44% 0.053 261.7)
XYZxyz(0.5870, 0.5139, 1.9873)
Luminance0.0051 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F27 #271C04
analogous
#042027 #040F27 #0A0427
triadic
#040F27 #27040F #0F2704
tetradic
#040F27 #270420 #271C04 #04270A
square
#040F27 #270420 #271C04 #04270A
split-complementary
#040F27 #270A04 #202704
monochromatic
#030B1C #030B1C #040F27 #0A245F #0F3A96

Accessibility & contrast

On white

19.04
#040F27 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F27
19.04:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F27#FFFFFF#000000##FFFFFF
##040F271.0019.041.1019.04
#FFFFFF19.041.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.041.0021.001.00

Color blindness preview

Protanopia (red-blind)
#031228
Deuteranopia (green-blind)
#000E27
Tritanopia (blue-blind)
#001519
Achromatopsia (no color)
#101010

Design tokens & code

CSS
--color: #040f27;
/* rgb */ color: rgb(4, 15, 39);
/* oklch */ color: oklch(17.4% 0.053 261.7);
Tailwind
colors: {
  custom: {
    50: '#494e61',
    500: '#040f27',
    950: '#000000',
  },
}
SCSS
$custom: #040f27;
$custom-light: #494e61;
$custom-dark: #000000;
JSON
{
  "hex": "#040f27",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 39
  },
  "hsl": {
    "h": 221.143,
    "s": 81.395,
    "l": 8.431
  },
  "oklch": {
    "l": 0.17438,
    "c": 0.05266,
    "h": 261.7
  },
  "luminance": 0.00514
}

Semantic roles & 50–950 ramp

primary
#040F27
secondary
#6A521D
accent
#B930F8
background
#F4F4F5
surface
#E7E7E9
border
#C3C3C5
text
#010105
muted
#777779

Preview Lab

Preview with #040F27

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

Preview Lab → · Contrast checker → · Palette generator →

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