-
Notifications
You must be signed in to change notification settings - Fork 0
/
LinuxColors.java
137 lines (74 loc) · 4.16 KB
/
LinuxColors.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package de.nettybyte.colors;
import java.util.Random;
public class LinuxColors {
public static final boolean SUPPORT = !System.getProperty("os.name").toLowerCase().contains("win");
public static final String RESET = "\033[0m";
public static final String BLACK = "\033[0;30m";
public static final String RED = "\033[0;31m";
public static final String GREEN = "\033[0;32m";
public static final String YELLOW = "\033[0;33m";
public static final String BLUE = "\033[0;34m";
public static final String PURPLE = "\033[0;35m";
public static final String CYAN = "\033[0;36m";
public static final String WHITE = "\033[0;37m";
public static final String BLACK_BOLD = "\033[1;30m";
public static final String RED_BOLD = "\033[1;31m";
public static final String GREEN_BOLD = "\033[1;32m";
public static final String YELLOW_BOLD = "\033[1;33m";
public static final String BLUE_BOLD = "\033[1;34m";
public static final String PURPLE_BOLD = "\033[1;35m";
public static final String CYAN_BOLD = "\033[1;36m";
public static final String WHITE_BOLD = "\033[1;37m";
public static final String BLACK_UNDERLINED = "\033[4;30m";
public static final String RED_UNDERLINED = "\033[4;31m";
public static final String GREEN_UNDERLINED = "\033[4;32m";
public static final String YELLOW_UNDERLINED = "\033[4;33m";
public static final String BLUE_UNDERLINED = "\033[4;34m";
public static final String PURPLE_UNDERLINED = "\033[4;35m";
public static final String CYAN_UNDERLINED = "\033[4;36m";
public static final String WHITE_UNDERLINED = "\033[4;37m";
public static final String BLACK_BACKGROUND = "\033[40m";
public static final String RED_BACKGROUND = "\033[41m";
public static final String GREEN_BACKGROUND = "\033[42m";
public static final String YELLOW_BACKGROUND = "\033[43m";
public static final String BLUE_BACKGROUND = "\033[44m";
public static final String PURPLE_BACKGROUND = "\033[45m";
public static final String CYAN_BACKGROUND = "\033[46m";
public static final String WHITE_BACKGROUND = "\033[47m";
public static final String BLACK_BRIGHT = "\033[0;90m";
public static final String RED_BRIGHT = "\033[0;91m";
public static final String GREEN_BRIGHT = "\033[0;92m";
public static final String YELLOW_BRIGHT = "\033[0;93m";
public static final String BLUE_BRIGHT = "\033[0;94m";
public static final String PURPLE_BRIGHT = "\033[0;95m";
public static final String CYAN_BRIGHT = "\033[0;96m";
public static final String WHITE_BRIGHT = "\033[0;97m";
public static final String BLACK_BOLD_BRIGHT = "\033[1;90m";
public static final String RED_BOLD_BRIGHT = "\033[1;91m";
public static final String GREEN_BOLD_BRIGHT = "\033[1;92m";
public static final String YELLOW_BOLD_BRIGHT = "\033[1;93m";
public static final String BLUE_BOLD_BRIGHT = "\033[1;94m";
public static final String PURPLE_BOLD_BRIGHT = "\033[1;95m";
public static final String CYAN_BOLD_BRIGHT = "\033[1;96m";
public static final String WHITE_BOLD_BRIGHT = "\033[1;97m";
public static final String BLACK_BACKGROUND_BRIGHT = "\033[0;100m";
public static final String RED_BACKGROUND_BRIGHT = "\033[0;101m";
public static final String GREEN_BACKGROUND_BRIGHT = "\033[0;102m";
public static final String YELLOW_BACKGROUND_BRIGHT = "\033[0;103m";
public static final String BLUE_BACKGROUND_BRIGHT = "\033[0;104m";
public static final String PURPLE_BACKGROUND_BRIGHT = "\033[0;105m";
public static final String CYAN_BACKGROUND_BRIGHT = "\033[0;106m";
public static final String WHITE_BACKGROUND_BRIGHT = "\033[0;107m";
public static final String[] colors = new String[] {
"\033[0;94m", "\033[0;36m", "\033[0;96m", "\033[0;92m", "\033[0;95m", "\033[0;31m", "\033[0;91m", "\033[0;33m", "\033[0;93m", "\033[0;37m",
"\033[0;97m" };
public static final Random r = new Random();
public static String getRandomColor() {
return colors[r.nextInt(colors.length - 1)];
}
}
om r = new Random();
public static String getRandomColor() {
return colors[r.nextInt(colors.length - 1)];
}
}