#040F34

Closest named color: Dark Navy (#000435). oklch(18.8% 0.075 265.2), rgb(4, 15, 52).

Aa

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

About this color

#040F34 is a very dark, moderately saturated blue. In OKLCH its lightness is 19%, its chroma 0.075 and its hue 265°. Its hue sits on the cool side of the wheel. The nearest named color is Dark Navy (#000435), ΔE 0.035 away. White text reads best on it, at 18.69:1.

Hue familyBlues
Lightnessvery dark (19%)
Chromamoderately saturated (0.075)
Temperaturecool
Nearest nameDark Navy (#000435)
Black text1.12:1
White text18.69:1

Values

HEX#040F34
RGBrgb(4, 15, 52)
HSLhsl(226, 86%, 11%)
OKLCHoklch(18.8% 0.075 265.2)

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 #040F34 18.69:1 AAA Lc -107.1 Preferred for body text
Black text on #040F34 1.12:1 Fails Lc 0.0 Not readable
#040F34 text on white 18.69:1 AAA Lc 105.0 Preferred for body text
#040F34 text on black 1.12: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

    #F2F5FE

    oklch(97% 0.012 271.3)

  2. Step 100

    100

    #E2EAFC

    oklch(93.6% 0.026 266.6)

  3. Step 200

    200

    #C9D9FB

    oklch(88.4% 0.05 265.4)

  4. Step 300

    300

    #A5C0FB

    oklch(80.9% 0.089 265.4)

  5. Step 400

    400

    #759DF9

    oklch(70.7% 0.142 265.2)

  6. Step 500

    500

    #5381F6

    oklch(63.1% 0.182 265.4)

  7. Step 600

    600

    #3967E5

    oklch(55.6% 0.198 265.2)

  8. Step 700

    700

    #2C55C7

    oklch(49.1% 0.184 265.1)

  9. Step 800

    800

    #2546A1

    oklch(42.7% 0.153 265.3)

  10. Step 900

    900

    #223C80

    oklch(37.7% 0.119 265.3)

  11. Step 950

    950 (this color)

    #040F34

    oklch(18.8% 0.075 265.2)

Export this scale for Tailwind in the Tailwind colors tool

#040F34 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)#0015350.018
Deuteranopia (no green cones)#0010330.008
Tritanopia (no blue cones)#00181F0.057
Achromatopsia (no color)#1212120.075

Harmonies

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

Complementary

The opposite hue (180°).

  • #040F34

    #040F34

    oklch(18.8% 0.075 265.2)

  • #1B1200

    #1B1200

    oklch(18.9% 0.039 86.5)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #040F34

    #040F34

    oklch(18.8% 0.075 265.2)

  • #001622

    #001622

    oklch(18.8% 0.039 233.4)

  • #170830

    #170830

    oklch(18.7% 0.075 295.5)

Open the analogous palette in the generator

Split complementary

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

  • #040F34

    #040F34

    oklch(18.8% 0.075 265.2)

  • #220C00

    #220C00

    oklch(18.6% 0.046 54.6)

  • #131500

    #131500

    oklch(18.7% 0.042 114.1)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #040F34

    #040F34

    oklch(18.8% 0.075 265.2)

  • #2D0002

    #2D0002

    oklch(18.7% 0.076 25.2)

  • #001A02

    #001A02

    oklch(18.9% 0.06 144.7)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #040F34

    #040F34

    oklch(18.8% 0.075 265.2)

  • #2A0115

    #2A0115

    oklch(18.8% 0.074 355)

  • #1B1200

    #1B1200

    oklch(18.9% 0.039 86.5)

  • #001812

    #001812

    oklch(18.7% 0.035 174.7)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

Use #040F34 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.