Last active
June 3, 2019 00:18
-
-
Save KaiWedekind/60536027a8b079f84450d8a09eeac808 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getContrast50(hex){ | |
return (parseInt(hex, 16) > 0xffffff/2) ? 'black': 'white'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment