Skip to content

Instantly share code, notes, and snippets.

@schonstal
Created February 5, 2013 21:52
Show Gist options
  • Save schonstal/4718086 to your computer and use it in GitHub Desktop.
Save schonstal/4718086 to your computer and use it in GitHub Desktop.
blendedColor =
((((colorAlpha*(newColor&0xff0000) + (256-colorAlpha)*(color&0xff0000)) >> 8) & 0xff0000) |
(((colorAlpha*(newColor&0xff) + (256-colorAlpha)*(color&0xff)) >> 8) & 0xff) |
(((colorAlpha*(newColor&0xff00) + (256-colorAlpha)*(color&0xff00)) >> 8) & 0xff00)) |
0xff000000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment