Created
May 29, 2019 18:20
-
-
Save nblackburn/1e8fb7932f624485534ff7aa2c44972a to your computer and use it in GitHub Desktop.
This file contains 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
module.exports = (foreground, background) => { | |
const l1 = Math.max(foreground, background); | |
const l2 = Math.min(foreground, background); | |
return (l1 + 0.05) / (l2 + 0.05); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment