aboutsummaryrefslogtreecommitdiff
path: root/misc/gencolor.jar
blob: 521aa1d79132c5eeff54101bd6a8f0e6e3d2c3e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
    private static int genColor(int i)
    {
        int b = (i >> 0 & 1) * 170;
        int g = (i >> 1 & 1) * 170;
        int r = (i >> 2 & 1) * 170;
        if(i == 6)
            g += 85;
        else
        if(i >= 8)
        {
            r += 85;
            g += 85;
            b += 85;
        }
        return 0xff000000 | r << 16 | g << 8 | b;
    }