#040727

Closest named color: Midnight (#03012D). oklch(15.3% 0.066 270.4), rgb(4, 7, 39).

Aa

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

About this color

#040727 is a very dark, muted blue. In OKLCH its lightness is 15%, its chroma 0.066 and its hue 270°. Its hue sits on the cool side of the wheel. The nearest named color is Midnight (#03012D), ΔE 0.025 away. White text reads best on it, at 19.72:1.

Hue familyBlues
Lightnessvery dark (15%)
Chromamuted (0.066)
Temperaturecool
Nearest nameMidnight (#03012D)
Black text1.06:1
White text19.72:1

Values

HEX#040727
RGBrgb(4, 7, 39)
HSLhsl(235, 81%, 8%)
OKLCHoklch(15.3% 0.066 270.4)

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 #040727 19.72:1 AAA Lc -107.6 Preferred for body text
Black text on #040727 1.06:1 Fails Lc 0.0 Not readable
#040727 text on white 19.72:1 AAA Lc 105.6 Preferred for body text
#040727 text on black 1.06: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

    #F3F5FD

    oklch(97.1% 0.011 274.9)

  2. Step 100

    100

    #E4EAFA

    oklch(93.7% 0.023 269.4)

  3. Step 200

    200

    #CED8F7

    oklch(88.4% 0.044 271.3)

  4. Step 300

    300

    #ADBFF4

    oklch(81% 0.078 270)

  5. Step 400

    400

    #839CEE

    oklch(70.8% 0.124 270.1)

  6. Step 500

    500

    #6580E9

    oklch(63% 0.16 270.4)

  7. Step 600

    600

    #4E67D7

    oklch(55.5% 0.174 270.4)

  8. Step 700

    700

    #4055BB

    oklch(49.1% 0.162 270.6)

  9. Step 800

    800

    #344697

    oklch(42.6% 0.134 270.3)

  10. Step 900

    900

    #2D3C78

    oklch(37.7% 0.104 270.2)

  11. Step 950

    950 (this color)

    #040727

    oklch(15.3% 0.066 270.4)

Export this scale for Tailwind in the Tailwind colors tool

#040727 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)#000C280.017
Deuteranopia (no green cones)#0009260.011
Tritanopia (no blue cones)#000F150.052
Achromatopsia (no color)#0B0B0B0.066

Harmonies

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

Complementary

The opposite hue (180°).

  • #040727

    #040727

    oklch(15.3% 0.066 270.4)

  • #110B00

    #110B00

    oklch(15.3% 0.031 89.9)

Open the complementary palette in the generator

Analogous

Neighbouring hues, 30° either side.

  • #040727

    #040727

    oklch(15.3% 0.066 270.4)

  • #000D19

    #000D19

    oklch(15.2% 0.035 241)

  • #110323

    #110323

    oklch(15.3% 0.067 300.2)

Open the analogous palette in the generator

Split complementary

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

  • #040727

    #040727

    oklch(15.3% 0.066 270.4)

  • #160800

    #160800

    oklch(15.3% 0.035 62.8)

  • #0A0E00

    #0A0E00

    oklch(15.4% 0.037 120.1)

Open the split complementary palette in the generator

Triadic

Three hues spaced 120° apart.

  • #040727

    #040727

    oklch(15.3% 0.066 270.4)

  • #1F0100

    #1F0100

    oklch(15.3% 0.059 31.5)

  • #001003

    #001003

    oklch(15.1% 0.042 149.4)

Open the triadic palette in the generator

Square

Four hues spaced 90° apart.

  • #040727

    #040727

    oklch(15.3% 0.066 270.4)

  • #1E000A

    #1E000A

    oklch(15.2% 0.061 1)

  • #110B00

    #110B00

    oklch(15.3% 0.031 89.9)

  • #00100C

    #00100C

    oklch(15.5% 0.029 177.5)

Open the square palette in the generator

Palettes with this color

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

Similar named colors

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

Use #040727 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.