4 ms·
that's cool. use both. calculate a good default contrast server side, use proposal to allow client side to override default
by pyrolistical 4y ago
that's cool. use both. calculate a good default contrast server side, use proposal to allow client side to override default
- sharlos201068 4y agoUnless it's a dynamic arbitrary colour (user-selected, overlaid on an image, etc.) then there's not much reason to be doing colour contrast calculations. Your site's design should just have well-chosen colours.
- anikom15 4y agoThe only reason this is a problem is because different monitors have different display characteristics compounded by arbitrary viewing environments. A client-side function can measure neither the response of the monitor nor the ambient light of the room, so this problem can never be solved in this manner.
- namibj 4y agoBoth of those are already APIs today in phones. And there's decent reason to not want to tell the server either.
- eyelidlessness 4y agoSo GP was relevant because that’s exactly what GitHub is doing: dynamically picking arbitrary colors and trying to put appropriately contrasting text on them.