Hacker News new | past | comments | ask | show | jobs | submit login

A reasonable solution to this might be to determine when the number of pixels that'd match dark v light is near the midpoint, adding a text-shadow (for text) or box-shadow (everything else) of 1px with the more dominant of the two colors.

Edit: Looked closer at the library, if he just added dark-mid or light-mid styles when close, the user can implement the appropriate visual differentiator. Should be good.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: