#040F2C#040F2C

#040F2C is a very dark, moderate blue. Relative luminance 0.005; OKLCH L 17.9% C 0.061 H 263.6°. Best body text is #FFFFFF at 18.92:1 contrast (WCAG AA passes).

Color values

HEX#040F2C
RGBrgb(4, 15, 44)
HSLhsl(224, 83%, 9%)
HSVhsv(224, 91%, 17%)
CMYKcmyk(90.9%, 65.9%, 0%, 82.7%)
CIE-LABlab(4.96, 6.28, -20.35)
CIE-LCHlch(4.96, 21.29, 287.16°)
OKLaboklab(17.92% -0.0068 -0.0611)
OKLCHoklch(17.92% 0.061 263.6)
XYZxyz(0.6754, 0.5492, 2.4528)
Luminance0.0055 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F2C #2C2104
analogous
#04232C #040F2C #0D042C
triadic
#040F2C #2C040F #0F2C04
tetradic
#040F2C #2C0423 #2C2104 #042C0D
square
#040F2C #2C0423 #2C2104 #042C0D
split-complementary
#040F2C #2C0D04 #232C04
monochromatic
#030A1C #030A1C #040F2C #092264 #0E359C

Accessibility & contrast

On white

18.92
#040F2C on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.11
#040F2C on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040F2C
18.92:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F2C#FFFFFF#000000##FFFFFF
##040F2C1.0018.921.1118.92
#FFFFFF18.921.0021.001.00
#0000001.1121.001.0021.00
##FFFFFF18.921.0021.001.00

Color blindness preview

Protanopia (red-blind)
#00132D
Deuteranopia (green-blind)
#000F2B
Tritanopia (blue-blind)
#00161B
Achromatopsia (no color)
#111111

Design tokens & code

CSS
--color: #040f2c;
/* rgb */ color: rgb(4, 15, 44);
/* oklch */ color: oklch(17.9% 0.061 263.6);
Tailwind
colors: {
  custom: {
    50: '#4a4d65',
    500: '#040f2c',
    950: '#000000',
  },
}
SCSS
$custom: #040f2c;
$custom-light: #4a4d65;
$custom-dark: #000000;
JSON
{
  "hex": "#040f2c",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 44
  },
  "hsl": {
    "h": 223.5,
    "s": 83.333,
    "l": 9.412
  },
  "oklch": {
    "l": 0.17923,
    "c": 0.06147,
    "h": 263.6
  },
  "luminance": 0.00549
}

Semantic roles & 50–950 ramp

primary
#040F2C
secondary
#6F581D
accent
#C22EFA
background
#F4F4F6
surface
#E7E7EB
border
#C3C3C6
text
#010105
muted
#77777A

Preview Lab

Preview with #040F2C

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

Preview Lab → · Contrast checker → · Palette generator →

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