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

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.




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: