|
@@ -962,16 +962,21 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
}
|
|
}
|
|
|
|
|
|
public Integer generateColorForIndex(int index){
|
|
public Integer generateColorForIndex(int index){
|
|
- int r[] = new int[]{0,0,0,1,1,1,1};
|
|
|
|
- int g[] = new int[]{0,1,1,1,1,0,0};
|
|
|
|
- int b[] = new int[]{1,1,0,0,1,1,0};
|
|
|
|
|
|
+ int r[] = new int[]{0,0,1,1,0,1,1};
|
|
|
|
+ int g[] = new int[]{0,1,0,0,1,1,1};
|
|
|
|
+ int b[] = new int[]{1,0,0,1,1,0,1};
|
|
|
|
|
|
- int a = index % 16;
|
|
|
|
|
|
+ int a = (index / 7);
|
|
int n = index % 7;
|
|
int n = index % 7;
|
|
|
|
|
|
- int R = Math.max( (r[n] * 255) - ((Math.max(0,(a ))) * 16), 0);
|
|
|
|
- int G = Math.max( (g[n] * 255) - ((Math.max(0,(a ))) * 16), 0);
|
|
|
|
- int B = Math.max( (b[n] * 255) - ((Math.max(0,(a ))) * 16), 0);
|
|
|
|
|
|
+ int q = Math.max(1, 2 * (a / 7));
|
|
|
|
+ int multiplier = 16 / (q);
|
|
|
|
+
|
|
|
|
+ int sub = (Math.min(((Math.max(0,(a ))) * multiplier), 16));
|
|
|
|
+
|
|
|
|
+ int R = Math.max( (r[n] * 255) - sub, 0);
|
|
|
|
+ int G = Math.max( (g[n] * 255) - sub, 0);
|
|
|
|
+ int B = Math.max( (b[n] * 255) - sub, 0);
|
|
|
|
|
|
return Color.argb(255,R,G,B);
|
|
return Color.argb(255,R,G,B);
|
|
}
|
|
}
|