-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColours.java
More file actions
23 lines (22 loc) · 936 Bytes
/
Colours.java
File metadata and controls
23 lines (22 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* This class is used to create coloured output. One of defined inside colours can be used.
*/
@SuppressWarnings("WeakerAccess")
class Colours {
public static final String ANSI_BLACK = "\u001B[30m";
public static final String ANSI_RED = "\u001B[31m";
public static final String ANSI_GREEN = "\u001B[32m";
public static final String ANSI_YELLOW = "\u001B[33m";
public static final String ANSI_BLUE = "\u001B[34m";
public static final String ANSI_PURPLE = "\u001B[35m";
public static final String ANSI_CYAN = "\u001B[36m";
public static final String ANSI_WHITE = "\u001B[37m";
public static final String ANSI_RESET = "\u001B[0m";
/**
* The method returns all supported colours.
*/
public static String[] getColours() {
return new String[]{ANSI_BLACK, ANSI_BLUE, ANSI_CYAN, ANSI_RED,
ANSI_RESET, ANSI_GREEN, ANSI_YELLOW, ANSI_WHITE, ANSI_PURPLE};
}
}