#040F28#040F28

#040F28 is a very dark, muted blue. Relative luminance 0.005; OKLCH L 17.5% C 0.054 H 262.2°. Best body text is #FFFFFF at 19.02:1 contrast (WCAG AA passes).

Color values

HEX#040F28
RGBrgb(4, 15, 40)
HSLhsl(222, 82%, 9%)
HSVhsv(222, 90%, 16%)
CMYKcmyk(90%, 62.5%, 0%, 84.3%)
CIE-LABlab(4.70, 4.46, -17.73)
CIE-LCHlch(4.70, 18.29, 284.13°)
OKLaboklab(17.53% -0.0074 -0.0539)
OKLCHoklch(17.53% 0.054 262.2)
XYZxyz(0.6038, 0.5206, 2.0757)
Luminance0.0052 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F28 #281D04
analogous
#042128 #040F28 #0B0428
triadic
#040F28 #28040F #0F2804
tetradic
#040F28 #280421 #281D04 #04280B
square
#040F28 #280421 #281D04 #04280B
split-complementary
#040F28 #280B04 #212804
monochromatic
#030A1C #030A1C #040F28 #0A2460 #0F3997

Accessibility & contrast

On white

19.02
#040F28 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040F28
19.02:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F28#FFFFFF#000000##FFFFFF
##040F281.0019.021.1019.02
#FFFFFF19.021.0021.001.00
#0000001.1021.001.0021.00
##FFFFFF19.021.0021.001.00

Color blindness preview

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

Design tokens & code

CSS
--color: #040f28;
/* rgb */ color: rgb(4, 15, 40);
/* oklch */ color: oklch(17.5% 0.054 262.2);
Tailwind
colors: {
  custom: {
    50: '#494e62',
    500: '#040f28',
    950: '#000000',
  },
}
SCSS
$custom: #040f28;
$custom-light: #494e62;
$custom-dark: #000000;
JSON
{
  "hex": "#040f28",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 40
  },
  "hsl": {
    "h": 221.667,
    "s": 81.818,
    "l": 8.627
  },
  "oklch": {
    "l": 0.17532,
    "c": 0.05443,
    "h": 262.2
  },
  "luminance": 0.00521
}

Semantic roles & 50–950 ramp

primary
#040F28
secondary
#6B531D
accent
#BB30F8
background
#F4F4F5
surface
#E7E7EA
border
#C3C3C6
text
#010105
muted
#777779

Preview Lab

Preview with #040F28

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

Preview Lab → · Contrast checker → · Palette generator →

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