Skip to content

Comment on Show HN: Bootswatch, free swatches for your Bootstrap siteparent

Comments

thanks, some intelligent way to automatically assign colors would be nice. May be I'll look at colors brightness and hue. For now, you can manually reassign them if the generated theme doesn't work.

It's over a dozen hours later, but... In the past I've used relative luminance to determine whether to display light or dark text on a colored background (take relative luminance of both, determine contrast ratio, don't remember exactly what ratio was required, I believe 5:1). You could use a similar method for the generated colors and use low ratios for things like gradients and high ratios for highlight buttons, etc.

AboutSource Built by g1lg1l

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