// i = 0 to n-1
static Color rainbowColor(int i, int n) {
  ret Color.getHSBColor(mod(i, n)/(float) n, 1f, 0.5f);
}