#040F41#040F41

#040F41 is a very dark, moderate blue. Relative luminance 0.007; OKLCH L 20.3% C 0.096 H 266.1°. Best body text is #FFFFFF at 18.26:1 contrast (WCAG AA passes).

Color values

HEX#040F41
RGBrgb(4, 15, 65)
HSLhsl(229, 88%, 14%)
HSVhsv(229, 94%, 25%)
CMYKcmyk(93.8%, 76.9%, 0%, 74.5%)
CIE-LABlab(6.77, 17.47, -32.76)
CIE-LCHlch(6.77, 37.13, 298.07°)
OKLaboklab(20.27% -0.0066 -0.0953)
OKLCHoklch(20.27% 0.096 266.1)
XYZxyz(1.1747, 0.7490, 5.0827)
Luminance0.0075 (WCAG relative)
Temperaturecool
Familyblue

Closest named colors

Perceptual scales

Shades

Tints

Tones

OKLCH scale

Color harmonies

complementary
#040F41 #413604
analogous
#042D41 #040F41 #170441
triadic
#040F41 #41040F #0F4104
tetradic
#040F41 #41042D #413604 #044117
square
#040F41 #41042D #413604 #044117
split-complementary
#040F41 #411704 #2D4104
monochromatic
#02071D #02071D #040F41 #081C7B #0B2AB4

Accessibility & contrast

On white

18.26
#040F41 on #FFFFFF
AA ✓AA large ✓AAA ✓

On black

1.15
#040F41 on #000000
AA ✗AA large ✗AAA ✗

Best text color

#FFFFFF on #040F41
18.26:1 — WCAG AA (normal text) passes

Contrast matrix

fg \ bg##040F41#FFFFFF#000000##FFFFFF
##040F411.0018.261.1518.26
#FFFFFF18.261.0021.001.00
#0000001.1521.001.0021.00
##FFFFFF18.261.0021.001.00

Color blindness preview

Protanopia (red-blind)
#001843
Deuteranopia (green-blind)
#001240
Tritanopia (blue-blind)
#001D26
Achromatopsia (no color)
#151515

Design tokens & code

CSS
--color: #040f41;
/* rgb */ color: rgb(4, 15, 65);
/* oklch */ color: oklch(20.3% 0.096 266.1);
Tailwind
colors: {
  custom: {
    50: '#524d76',
    500: '#040f41',
    950: '#000000',
  },
}
SCSS
$custom: #040f41;
$custom-light: #524d76;
$custom-dark: #000000;
JSON
{
  "hex": "#040f41",
  "rgb": {
    "r": 4,
    "g": 15,
    "b": 65
  },
  "hsl": {
    "h": 229.18,
    "s": 88.406,
    "l": 13.529
  },
  "oklch": {
    "l": 0.20265,
    "c": 0.09555,
    "h": 266.1
  },
  "luminance": 0.00749
}

Semantic roles & 50–950 ramp

primary
#040F41
secondary
#82701F
accent
#D829FF
background
#F4F4F7
surface
#E7E7ED
border
#C3C3C8
text
#030108
muted
#78777B

Preview Lab

Preview with #040F41

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

Preview Lab → · Contrast checker → · Palette generator →

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