Color

#040c39

#040c39
hex#040c39
rgbrgb(4, 12, 57)
hslhsl(231, 87%, 12%)
oklchoklch(0.187 0.087 267)
Closest name: Infinite Night (#071037)Relative luminance 0.0058

Tints & shades

Every swatch is its own page — click any to analyze it.

Harmonies

Complementary

Open in tool →

#393104

#042739 · #170439

#39040c · #0c3904

Split-complementary

Open in tool →

#391704 · #273904

#390427 · #393104 · #043917

Contrast

#040c39 as textRatioAAAA largeAAAFix
Aaon white
18.8:1passpasspassPasses AAA — no fix needed.
Aaon black
1.12:1failfailfail
  • AA: use #4f67f3 as the text (4.57:1)
  • AAA: use #7e90f6 as the text (7.21:1)
  • AA: or shift the background to #7d7d7d (4.57:1)
  • AAA: or shift the background to #9e9e9e (7.02:1)

Fixes keep hue and saturation and move lightness only, so the suggestion stays on-brand. Ratios are symmetric: the same numbers apply with #040c39 as the background.

Brands using this color

No public brand in the corpus uses this exact color yet. Extract a brand to add one.

Fonts for this mood

#040c39 reads as cool, vivid, dark. The font library is tagged with the same vocabulary:

mcpConnect your agent — build around #040c39
live endpoint

Point any MCP client at the shared colors endpoint and your agent gets the same engine as this page — generate_palette, check_contrast, analyze_color — read-only, no key. Every palette it proposes comes with a /palettes/new/… link: open it, lock what you like, paste the link back.

endpointhttps://mcp.brandsweets.com/colors/mcp
claude mcp add --transport http brandsweets-colors https://mcp.brandsweets.com/colors/mcp
try this prompt

analyze #040c39 and generate a 5-color palette that keeps it as the primary; give me the /palettes/new link

tool url/palettes/new/040c39-9c9ec4-df834e-231f2d-e9eef1?lock=0&style=vibrant

Want the agent to remember your picks and write them into a living brand? Create a free BrandSweets workspace.

Machine-readable: color.md