Skip to content

Comment on Ask HN: Why is the gray color of TailwindCSS dark blue?

Comments

It's a common UI/web design trick now to brand your color palette more by mixing in a little of your primary color into your "gray" swatch. Gray gets used a lot so this has a subtle but noticeable difference. Tailwind has a few gray swatches you can pick from (https://tailwindcss.com/docs/customizing-colors) where "neutral" is all gray if that's what matches your brand.

I have a tool for creating Tailwind color palettes you might find interesting here (https://inclusivecolors.com) where you can visualize how the hue of Tailwind's "gray" shifts a little to the left and the saturation goes from high to low as the gray gets lighter (you'll need to load the palette first via "Import" then "Tailwind"), and customise it if you want.

I see—design rule. And your website is inspiring.

Thanks! Just to add, this article https://www.refactoringui.com/previews/building-your-color-p... is good at explaining why you usually need several shades of gray (as well as shades of other colors) and related design rules.

I read it, it's a good article. It's probably an article I can recommend in the future when I talk to people about colors.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.