Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

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.


Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: