-
Notifications
You must be signed in to change notification settings - Fork 343
/
TodoTxtHighlighterColors.java
57 lines (49 loc) · 1.51 KB
/
TodoTxtHighlighterColors.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
/*#######################################################
*
* Maintained by Gregor Santner, 2018-
* https://gsantner.net/
*
* License of this file: Apache 2.0 (Commercial upon request)
* https://www.apache.org/licenses/LICENSE-2.0
*
#########################################################*/
package net.gsantner.markor.format.todotxt;
// Neutral means good readability in both, light and dark theme
@SuppressWarnings({"FieldCanBeLocal", "WeakerAccess"})
public class TodoTxtHighlighterColors {
private final int COLOR_CATEGORY = 0xffef6C00;
private final int COLOR_CONTEXT = 0xff88b04b;
private final int COLOR_LINK = 0xff1ea3fd;
public int getContextColor() {
return COLOR_CONTEXT;
}
public int getLinkColor() {
return COLOR_LINK;
}
public int getPriorityColor(int priority) {
switch (priority) {
case 1:
return 0xffEF2929;
case 2:
return 0xffF57900;
case 3:
return 0xff73D216;
case 4:
return 0xff0099CC;
case 5:
return 0xffEDD400;
default:
case 6:
return 0xff888A85;
}
}
public int getDoneColor(boolean isDarkBg) {
return isDarkBg ? 0x999d9d9d :0x993d3d3d;
}
public int getDateColor(boolean isDarkBg) {
return isDarkBg ? getDoneColor(isDarkBg) : 0xcc6d6d6d;
}
public int getCategoryColor() {
return COLOR_CATEGORY;
}
}