Adding Customized Color Theme in PySimpleGUI
Last Updated :
05 Aug, 2020
PySimpleGUI allows users to choose Themes for its Theme list. Also, it allows users to specify and customize the Theme according to their choice. The User only should know the Color shades i.e the hex codes of the Colors. Accordingly, he/she can customize the Theme by new Colors.
Example:
import PySimpleGUI as sg
sg.LOOK_AND_FEEL_TABLE[ 'MyCreatedTheme' ] = { 'BACKGROUND' : '# 000066' ,
'TEXT' : '# FFCC66' ,
'INPUT' : '# 339966' ,
'TEXT_INPUT' : '# 000000' ,
'SCROLL' : '# 99CC99' ,
'BUTTON' : ( '# 003333' , '# FFCC66' ),
'PROGRESS' : ( '# D1826B' , '# CC8019' ),
'BORDER' : 1 , 'SLIDER_DEPTH' : 0 ,
'PROGRESS_DEPTH' : 0 , }
sg.theme( 'MyCreatedTheme' )
sg.popup_get_text( 'This how the MyNewTheme is created' )
|
Output:
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...