Created
July 13, 2017 18:56
-
-
Save seanblanton/e035180398313361ca8467d5e7de79a4 to your computer and use it in GitHub Desktop.
rgb(a) alpha value override function
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
# Overrides rgba alpha values with a new alpha | |
const alpha = (color, opacity) => | |
color.replace(/[\d\.]+\)$/g, opacity+')') | |
alpha(gray100, 0.4) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment