Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1795 - 1
package dongfang.mk.ui;
2
 
3
import java.awt.Color;
4
 
5
import dongfang.mkt.MKGlobals;
6
 
7
public class DebugColors {
8
        public static final Color[] debugColors = new Color[MKGlobals.NUM_DEBUG_CHANNELS];
9
        static {
10
                for (int i=0; i<debugColors.length; i++) {
11
                        int r = i % 3;
12
                        int g = i % 5;
13
                        int b = i % 7;
14
                        int offset = 100;
15
                        debugColors[i] = new Color(
16
                                        offset + r * 10,
17
                                        offset + g * 10,
18
                                        offset + b * 10
19
                        );
20
                }
21
        }
22
 
23
        public static Color[] getDebugColors() {
24
                return debugColors;
25
        }
26
 
27
        public static Color getDebugColor(int index) {
28
                return debugColors[index];
29
        }
30
}