#040217#040217

#040217 is a very dark, muted blue. Relative luminance 0.001; OKLCH L 11.5% C 0.051 H 282.3°. Best body text is #FFFFFF at 20.46:1 contrast (WCAG AA passes).

Color values

HEX#040217
RGBrgb(4, 2, 23)
HSLhsl(246, 84%, 5%)
HSVhsv(246, 91%, 9%)
CMYKcmyk(82.6%, 91.3%, 0%, 91%)
CIE-LABlab(1.18, 4.17, -9.74)
CIE-LCHlch(1.18, 10.60, 293.17°)
OKLaboklab(11.47% 0.0109 -0.0501)
OKLCHoklch(11.47% 0.051 282.3)
XYZxyz(0.2264, 0.1311, 0.8238)
Luminance0.0013 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040217 #151702
analogous
#020B17 #040217 #0F0217
triadic
#040217 #170402 #021704
tetradic
#040217 #17020B #151702 #02170F
square
#040217 #17020B #151702 #02170F
split-complementary
#040217 #170F02 #0B1702
monochromatic
#05021C #05021C #05021C #0E074F #180C88

Accessibility & contrast

On white

20.46
#040217 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

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

Best text color

#FFFFFF on #040217
20.46:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040217#FFFFFF#000000##FFFFFF
##0402171.0020.461.0320.46
#FFFFFF20.461.0021.001.00
#0000001.0321.001.0021.00
##FFFFFF20.461.0021.001.00

Color blindness preview

Protanopia (red-blind)
#000518
Deuteranopia (green-blind)
#000417
Tritanopia (blue-blind)
#00060A
Achromatopsia (no color)
#040404

Design tokens & code

CSS
--color: #040217;
/* rgb */ color: rgb(4, 2, 23);
/* oklch */ color: oklch(11.5% 0.051 282.3);
Tailwind
colors: {
  custom: {
    50: '#484853',
    500: '#040217',
    950: '#000000',
  },
}
SCSS
$custom: #040217;
$custom-light: #484853;
$custom-dark: #000000;
JSON
{
  "hex": "#040217",
  "rgb": {
    "r": 4,
    "g": 2,
    "b": 23
  },
  "hsl": {
    "h": 245.714,
    "s": 84,
    "l": 4.902
  },
  "oklch": {
    "l": 0.11469,
    "c": 0.05124,
    "h": 282.3
  },
  "luminance": 0.00131
}

Semantic roles & 50–950 ramp

primary
#040217
secondary
#565D18
accent
#FA2EE7
background
#F4F4F4
surface
#E6E6E7
border
#C2C2C3
text
#000002
muted
#777778

Preview Lab

Preview with #040217

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

Preview Lab → · Contrast checker → · Palette generator →

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