Advertisement
Rion

Untitled

Oct 30th, 2011
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.21 KB | None | 0 0
  1. public static int getCol(int c) {
  2.     int r = (c >> 16) & 0xff;
  3.     int g = (c >> 8) & 0xff;
  4.     int b = (c) & 0xff;
  5.  
  6.     r = r * 0x55 / 0xff;
  7.     g = g * 0x55 / 0xff;
  8.     b = b * 0x55 / 0xff;
  9.  
  10.     return r << 16 | g << 8 | b;
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement