Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public static int rainbow(int delay) {
  2. double rainbowState = Math.ceil((System.currentTimeMillis() + delay) / 20.0);
  3. rainbowState %= 360.0;
  4. return Color.getHSBColor((float) (rainbowState / 360.0f), 0.8f, 0.7f).getRGB();
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement