-
Notifications
You must be signed in to change notification settings - Fork 0
/
ColorScheme.py
57 lines (42 loc) · 2.11 KB
/
ColorScheme.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
#
# Follow on GitHub : https://github.com/AnythingSuitable
#
DARK_MODE = {
'MainBackground' : '#161B22',
'MainForeground' : '#FFFFFF',
'SecondaryBlack' : '#30363D',
'PrimaryBlue' : '#1F6FEB',
'PrimaryGreen' : '#2EA043',
'PrimaryPurple' : '#6C63FF',
'PrimaryText' : '#FFFFFF',
'SecondaryText' : '#FFFFFF'
}
LIGHT_MODE = {
'MainBackground' : '#FFFFFF',
'MainForeground' : '#161B22',
'SecondaryBlack' : '#30363D',
'PrimaryBlue' : '#1F6FEB',
'PrimaryGreen' : '#2EA043',
'PrimaryPurple' : '#6C63FF',
'PrimaryText' : '#000000',
'SecondaryText' : '#FFFFFF'
}
def ColorScheme(MODE = 'DARK'):
if MODE.upper() == 'LIGHT':
MainBackground, MainForeground, SecondaryBlack, PrimaryBlue, PrimaryGreen, PrimaryPurple, PrimaryText, SecondaryText = LIGHT_MODE['MainBackground'], LIGHT_MODE['MainForeground'], LIGHT_MODE['SecondaryBlack'], LIGHT_MODE['PrimaryBlue'], LIGHT_MODE['PrimaryGreen'], LIGHT_MODE['PrimaryPurple'], LIGHT_MODE['PrimaryText'], LIGHT_MODE['SecondaryText']
return MainBackground, MainForeground, SecondaryBlack, PrimaryBlue, PrimaryGreen, PrimaryPurple, PrimaryText, SecondaryText
else:
MainBackground, MainForeground, SecondaryBlack, PrimaryBlue, PrimaryGreen, PrimaryPurple, PrimaryText, SecondaryText = DARK_MODE['MainBackground'], DARK_MODE['MainForeground'], DARK_MODE['SecondaryBlack'], DARK_MODE['PrimaryBlue'], DARK_MODE['PrimaryGreen'], DARK_MODE['PrimaryPurple'], DARK_MODE['PrimaryText'], DARK_MODE['SecondaryText']
return MainBackground, MainForeground, SecondaryBlack, PrimaryBlue, PrimaryGreen, PrimaryPurple, PrimaryText, SecondaryText
def Theme():
try:
with open('__ThemeMode__.txt', 'r') as Theme_Mode_File:
Theme_Mode = Theme_Mode_File.readlines()
Theme_Mode_File.close()
if len(Theme_Mode) == 0:
Theme_Mode = ['Dark']
except Exception as e:
Theme_Mode = ['DARK']
Theme_Mode = str(Theme_Mode[0])
MainBackground, MainForeground, SecondaryBlack, PrimaryBlue, PrimaryGreen, PrimaryPurple, PrimaryText, SecondaryText = ColorScheme(Theme_Mode)
return Theme_Mode, MainBackground, MainForeground, SecondaryBlack, PrimaryBlue, PrimaryGreen, PrimaryPurple, PrimaryText, SecondaryText