#040F27

Closest named color: Rich Navy (#001219). oklch(17.4% 0.053 261.7), rgb(4, 15, 39).

Aa

White text reads best on this color (19.04:1).

About this color

#040F27 is a very dark, muted blue. In OKLCH its lightness is 17%, its chroma 0.053 and its hue 262°. Its hue sits on the cool side of the wheel. The nearest named color is Rich Navy (#001219), ΔE 0.035 away. White text reads best on it, at 19.04:1.

Hue familyBlues
Lightnessvery dark (17%)
Chromamuted (0.053)
Temperaturecool
Nearest nameRich Navy (#001219)
Black text1.10:1
White text19.04:1

Values

HEX#040F27
RGBrgb(4, 15, 39)
HSLhsl(221, 81%, 8%)
OKLCHoklch(17.4% 0.053 261.7)

Contrast

WCAG 2 contrast ratios are the conformance target: AA needs 4.5:1 for body text and 3:1 for large text, AAA needs 7:1. APCA Lc values are supplementary guidance from the WCAG 3 drafts.

PairWCAG 2ResultAPCAAPCA guidance
White text on #040F27 19.04:1 AAA Lc -107.3 Preferred for body text
Black text on #040F27 1.10:1 Fails Lc 0.0 Not readable
#040F27 text on white 19.04:1 AAA Lc 105.3 Preferred for body text
#040F27 text on black 1.10:1 Fails Lc 0.0 Not readable

Tints and shades

A 50–950 scale built in OKLCH: the hue is held, lightness follows a Tailwind v4-like curve, and every step is kept inside the sRGB gamut. This color sits at step 950.

  1. Step 50

    50

    #F2F6FB

    oklch(97.2% 0.008 253.9)

  2. Step 100

    100

    #E3EAF6

    oklch(93.5% 0.018 261.3)

  3. Step 200

    200

    #CDDAF1

    oklch(88.6% 0.035 262)

  4. Step 300

    300

    #ABC1EA

    oklch(80.8% 0.063 262.8)

  5. Step 400

    400

    #7EA1DF

    oklch(70.8% 0.099 261.5)

  6. Step 500

    500

    #5D88D6

    oklch(63.1% 0.127 261.5)

  7. Step 600

    600

    #4470C4

    oklch(55.6% 0.14 262)

  8. Step 700

    700

    #365EA9

    oklch(49.2% 0.128 261.7)

  9. Step 800

    800

    #2D4D89

    oklch(42.8% 0.107 261.8)

  10. Step 900

    900

    #28406D

    oklch(37.6% 0.083 262)

  11. Step 950

    950 (this color)

    #040F27

    oklch(17.4% 0.053 261.7)

Export this scale for Tailwind in the Tailwind colors tool

#040F27 with color blindness

Simulated with the Machado et al. (2009) model. ΔE is how far the color moves: below about 0.02 you would not notice a change.

VisionSeen asShift (ΔE)
Protanopia (no red cones)#0312280.010
Deuteranopia (no green cones)#000E270.010
Tritanopia (no blue cones)#0015190.042
Achromatopsia (no color)#1010100.053

Harmonies

Hue rotations in OKLCH that keep this color's lightness and chroma.

Complementary

The opposite hue (180°).

  • #040F27

    #040F27

    oklch(17.4% 0.053 261.7)

  • #180E00

    #180E00

    oklch(17.3% 0.036 80.7)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #040F27

    #040F27

    oklch(17.4% 0.053 261.7)

  • #00131D

    #00131D

    oklch(17.5% 0.035 230.8)

  • #110B25

    #110B25

    oklch(17.5% 0.052 290.7)

Open the analogous palette in the generator

Split complementary

The two hues beside the complement (150° and 210°).

  • #040F27

    #040F27

    oklch(17.4% 0.053 261.7)

  • #1F0900

    #1F0900

    oklch(17.3% 0.045 51.1)

  • #111200

    #111200

    oklch(17.5% 0.039 112.2)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #040F27

    #040F27

    oklch(17.4% 0.053 261.7)

  • #230506

    #230506

    oklch(17.5% 0.053 22)

  • #021601

    #021601

    oklch(17.5% 0.054 141.6)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #040F27

    #040F27

    oklch(17.4% 0.053 261.7)

  • #200513

    #200513

    oklch(17.4% 0.052 350.8)

  • #180E00

    #180E00

    oklch(17.3% 0.036 80.7)

  • #00150F

    #00150F

    oklch(17.5% 0.033 173.2)

Open the square palette in the generator

Palettes with this color

Curated palettes that contain a color within ΔE 0.04 (OKLab) of #040F27, closest first.

Similar named colors

The eight closest entries in our named color list, with their ΔE distance.

Use #040F27 in your product

Turn it into light and dark UI roles checked for contrast, then export to Tailwind v4, shadcn/ui, CSS or design tokens.