Last active
September 28, 2017 14:16
-
-
Save StiviiK/b7efbfb34122c44ce60db53f10a7197d 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
function fromcolor(color) | |
return bitExtract(color, 16, 8), bitExtract(color, 8, 8), bitExtract(color, 0, 8), bitExtract(color, 24, 8) | |
end | |
function changeAlpha(color, alpha) | |
return bitReplace(color, alpha, 24, 8) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment