Repository navigation
Expand file tree
/
Copy pathDemo_GoodColors_2.py
More file actions
48 lines (36 loc) · 1.66 KB
/
Copy pathDemo_GoodColors_2.py
File metadata and controls
48 lines (36 loc) · 1.66 KB
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
#!/usr/bin/env python
import PySimpleGUI as sg
'''
Example of colors in PySimpleGUI
'''
def main():
s10 = (10, 2)
window = sg.Window('GoodColors', [
[sg.Text('Having trouble picking good colors? Try this')],
[sg.Text('Here come the good colors as defined by PySimpleGUI')],
[sg.Text('Button Colors Using PySimpleGUI.BLUES')],
[*[sg.Button('BLUES[{}]\n{}'.format(j, c), button_color=(sg.YELLOWS[0], c), size=s10)
for j, c in enumerate(sg.BLUES)]],
[sg.Text('_' * 100, size=(65, 1))],
[sg.Text('Button Colors Using PySimpleGUI.PURPLES')],
[*[sg.Button('PURPLES[{}]\n{}'.format(j, c), button_color=(sg.YELLOWS[0], c), size=s10)
for j, c in enumerate(sg.PURPLES)]],
[sg.Text('_' * 100, size=(65, 1))],
[sg.Text('Button Colors Using PySimpleGUI.GREENS')],
[*[sg.Button('GREENS[{}]\n{}'.format(j, c), button_color=(sg.YELLOWS[0], c), size=s10)
for j, c in enumerate(sg.GREENS)]],
[sg.Text('_' * 100, size=(65, 1))],
[sg.Text('Button Colors Using PySimpleGUI.TANS')],
[*[sg.Button('TANS[{}]\n{}'.format(j, c), button_color=(sg.GREENS[0], c), size=s10)
for j, c in enumerate(sg.TANS)]],
[sg.Text('_' * 100, size=(65, 1))],
[sg.Text('Button Colors Using PySimpleGUI.YELLOWS')],
[*[sg.Button('YELLOWS[{}]\n{}'.format(j, c), button_color=('black', c), size=s10)
for j, c in enumerate(sg.YELLOWS)]],
[sg.Text('_' * 100, size=(65, 1))],
[sg.Button('Click ME!')]
], default_element_size=(30, 2))
event, values = window.read()
window.close()
if __name__ == '__main__':
main()