-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcolors.py
61 lines (57 loc) · 1.28 KB
/
colors.py
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
colormap = {
'white': (255, 255, 255),
'lightgray': (228, 228, 228),
'darkgray': (136, 136, 136),
'black': (34, 34, 34),
'lightpink': (255, 167, 209),
'red': (229, 0, 0),
'orange': (229, 149, 0),
'brown': (160, 106, 66),
'yellow': (229, 217, 0),
'lightgreen': (148, 224, 68),
'green': (2, 190, 1),
'cyan': (0, 211, 221),
'grayblue': (0, 131, 199),
'blue': (0, 0, 234),
'pink': (207, 110, 228),
'purple': (130, 0, 128),
'dummy': (0, 128, 128)
}
mapcolor = {v: k for k, v in colormap.items()}
mapcode = {
(255, 255, 255): 0,
(228, 228, 228): 1,
(136, 136, 136): 2,
(34, 34, 34): 3,
(255, 167, 209): 4,
(229, 0, 0): 5,
(229, 149, 0): 6,
(160, 106, 66): 7,
(229, 217, 0): 8,
(148, 224, 68): 9,
(2, 190, 1): 10,
(0, 211, 211): 11,
(0, 131, 199): 12,
(0, 0, 234): 13,
(207, 110, 228): 14,
(130, 0, 128): 15
}
codemap = {v: k for k, v in mapcode.items()}
pallete = sum([
(255, 255, 255),
(228, 228, 228),
(136, 136, 136),
(34, 34, 34),
(255, 167, 209),
(229, 0, 0),
(229, 149, 0),
(160, 106, 66),
(229, 217, 0),
(148, 224, 68),
(2, 190, 1),
(0, 211, 221),
(0, 131, 199),
(0, 0, 234),
(207, 110, 228),
(130, 0, 128)
], ())