#040F31

Closest named color: Dark Navy (#000435). oklch(18.4% 0.07 264.8), rgb(4, 15, 49).

Aa

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

About this color

#040F31 is a very dark, moderately saturated blue. In OKLCH its lightness is 18%, its chroma 0.070 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.78:1.

Hue familyBlues
Lightnessvery dark (18%)
Chromamoderately saturated (0.070)
Temperaturecool
Nearest nameDark Navy (#000435)
Black text1.11:1
White text18.78:1

Values

HEX#040F31
RGBrgb(4, 15, 49)
HSLhsl(225, 85%, 10%)
OKLCHoklch(18.4% 0.07 264.8)

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 #040F31 18.78:1 AAA Lc -107.2 Preferred for body text
Black text on #040F31 1.11:1 Fails Lc 0.0 Not readable
#040F31 text on white 18.78:1 AAA Lc 105.1 Preferred for body text
#040F31 text on black 1.11: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

    #F2F6FD

    oklch(97.2% 0.01 261.8)

  2. Step 100

    100

    #E2EAFB

    oklch(93.6% 0.025 265.6)

  3. Step 200

    200

    #CAD9F9

    oklch(88.4% 0.047 265.5)

  4. Step 300

    300

    #A6C0F7

    oklch(80.8% 0.083 264.9)

  5. Step 400

    400

    #779EF3

    oklch(70.7% 0.132 264.6)

  6. Step 500

    500

    #5583EF

    oklch(63.1% 0.17 264.7)

  7. Step 600

    600

    #3C6ADD

    oklch(55.7% 0.183 264.7)

  8. Step 700

    700

    #2E57C0

    oklch(49% 0.171 264.7)

  9. Step 800

    800

    #27489B

    oklch(42.7% 0.141 264.7)

  10. Step 900

    900

    #243D7C

    oklch(37.7% 0.111 265.2)

  11. Step 950

    950 (this color)

    #040F31

    oklch(18.4% 0.07 264.8)

Export this scale for Tailwind in the Tailwind colors tool

#040F31 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)#0014320.016
Deuteranopia (no green cones)#0010300.008
Tritanopia (no blue cones)#00181E0.055
Achromatopsia (no color)#1212120.070

Harmonies

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

Complementary

The opposite hue (180°).

  • #040F31

    #040F31

    oklch(18.4% 0.07 264.8)

  • #1A1100

    #1A1100

    oklch(18.4% 0.038 85.8)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #040F31

    #040F31

    oklch(18.4% 0.07 264.8)

  • #001521

    #001521

    oklch(18.4% 0.039 234.1)

  • #16092E

    #16092E

    oklch(18.6% 0.07 294.8)

Open the analogous palette in the generator

Split complementary

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

  • #040F31

    #040F31

    oklch(18.4% 0.07 264.8)

  • #210C00

    #210C00

    oklch(18.4% 0.045 55.9)

  • #121400

    #121400

    oklch(18.3% 0.041 114.3)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #040F31

    #040F31

    oklch(18.4% 0.07 264.8)

  • #2B0203

    #2B0203

    oklch(18.6% 0.07 25.4)

  • #001902

    #001902

    oklch(18.5% 0.059 144.8)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #040F31

    #040F31

    oklch(18.4% 0.07 264.8)

  • #280214

    #280214

    oklch(18.5% 0.069 355.4)

  • #1A1100

    #1A1100

    oklch(18.4% 0.038 85.8)

  • #001712

    #001712

    oklch(18.3% 0.034 177.3)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

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