import PySimpleGUI as sg

"""
    Demo showing how to add your own theme.
    
    There are functions to make the job quick and easy.
    
    Copyright 2021 PySimpleGUI.org
"""

# First make a dictionary with the required keys.
# Use only colors in the format of #RRGGBB
DarkGrey20 = {'BACKGROUND': '#19232D',
             'TEXT': '#ffffff',
             'INPUT': '#32414B',
             'TEXT_INPUT': '#ffffff',
             'SCROLL': '#505F69',
             'BUTTON': ('#ffffff', '#32414B'),
             'PROGRESS': ('#505F69', '#32414B'),
             'BORDER': 1, 'SLIDER_DEPTH': 0, 'PROGRESS_DEPTH': 0,
             }

# Add your dictionary to the PySimpleGUI themes
sg.theme_add_new('DarkGrey20', DarkGrey20)

# Switch your theme to use the newly added one
sg.theme('Dark Grey 20')

def main():
    # Test it out!
    try:
        sg.popup_get_text('Dark Grey 20 looks like this.', image=sg.EMOJI_BASE64_HAPPY_THUMBS_UP)
    except:
        sg.popup_get_text('Dark Grey 20 looks like this.\n' + \
                          'Upgrading to 4.35.0+ will give you a nice emoji like the one above',
                          image=EMOJI_BASE64_HAPPY_THUMBS_UP)

if __name__ == '__main__':
    EMOJI_BASE64_HAPPY_THUMBS_UP = b'[encoded data, 8028 characters]'
    main()