Advertisement
tahg

Untitled

Sep 1st, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. int color1,color2;
  2. float [] hsb = new float[3];
  3. //init color1 here
  4. Color.RGBtoHSB((color1 >> 16) & 0xFF, (color1 >> 8) & 0xFF, color1 & 0xFF, hsb);
  5. hsb[0] = (hsb[0]+180) % 360;
  6. color2 = Color.HSBtoRGB(hsb[0], hsb[1], hsb[2]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement