Created
February 20, 2010 04:17
-
-
Save ongaeshi/309498 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
private function colorMul(color:uint, rate:Number):uint | |
{ | |
var r:uint = (color >> 16) & 0xff; | |
var g:uint = (color >> 8) & 0xff; | |
var b:uint = (color >> 0) & 0xff; | |
r *= rate; | |
g *= rate; | |
b *= rate; | |
return ((r & 0xff) << 16) | ((g & 0xff) << 6) | (b & 0xff); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment