Created
February 3, 2020 17:22
-
-
Save danhollick/d42a9f806ecd34795409d478a08c5adc to your computer and use it in GitHub Desktop.
Pass foreground alpha
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
let foregroundColor | |
let foregroundAlpha | |
//... | |
// selecton listener | |
foregroundColor = getRGB(fills[0].color) | |
foregroundAlpha = fills[0].opacity | |
backgoundColor = getRGB(fills[1].color) | |
const contrast = calculateContrast( | |
foregroundColor, | |
foregroundAlpha, | |
backgoundColor | |
) | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment