#040218#040218

#040218 is a very dark, muted blue. Relative luminance 0.001; OKLCH L 11.6% C 0.053 H 281.6°. Best body text is #FFFFFF at 20.45:1 contrast (WCAG AA passes).

Color values

HEX#040218
RGBrgb(4, 2, 24)
HSLhsl(245, 85%, 5%)
HSVhsv(245, 92%, 9%)
CMYKcmyk(83.3%, 91.7%, 0%, 90.6%)
CIE-LABlab(1.22, 4.43, -10.45)
CIE-LCHlch(1.22, 11.35, 292.97°)
OKLaboklab(11.6% 0.0106 -0.0519)
OKLCHoklch(11.6% 0.053 281.6)
XYZxyz(0.2366, 0.1352, 0.8776)
Luminance0.0014 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040218 #161802
analogous
#020B18 #040218 #0F0218
triadic
#040218 #180402 #021804
tetradic
#040218 #18020B #161802 #02180F
square
#040218 #18020B #161802 #02180F
split-complementary
#040218 #180F02 #0B1802
monochromatic
#05021C #05021C #05021C #0D0750 #170B89

Accessibility & contrast

On white

20.45
#040218 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.03
#040218 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040218
20.45:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040218#FFFFFF#000000##FFFFFF
##0402181.0020.451.0320.45
#FFFFFF20.451.0021.001.00
#0000001.0321.001.0021.00
##FFFFFF20.451.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000519
Deuteranopia (green-blind)
#000418
Tritanopia (blue-blind)
#00060B
Achromatopsia (no color)
#040404

Design tokens & code

CSS
--color: #040218;
/* rgb */ color: rgb(4, 2, 24);
/* oklch */ color: oklch(11.6% 0.053 281.6);
Tailwind
colors: {
  custom: {
    50: '#484854',
    500: '#040218',
    950: '#000000',
  },
}
SCSS
$custom: #040218;
$custom-light: #484854;
$custom-dark: #000000;
JSON
{
  "hex": "#040218",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 24
  },
  "hsl": {
    "h": 245.455,
    "s": 84.615,
    "l": 5.098
  },
  "oklch": {
    "l": 0.11601,
    "c": 0.05294,
    "h": 281.6
  },
  "luminance": 0.00135
}

Semantic roles & 50–950 ramp

primary
#040218
secondary
#575E18
accent
#FB2DE8
background
#F4F4F4
surface
#E6E6E7
border
#C2C2C3
text
#000002
muted
#777778

Preview Lab

Preview with #040218

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

Preview Lab → · Contrast checker → · Palette generator →

#040218 Color — HEX, RGB, HSL, OKLCH & Contrast — Tintiva