'grey17', 'grey18', 'grey19', 'grey20', 'grey21', 'grey22', 'grey23', 'grey24', 'grey25', 'grey26', 'grey27', 'grey28', 'grey29', 'grey30', 'grey31', 'grey32', 'grey33', 'grey34', 'grey35', 'grey36', 'grey37', 'grey38', 'grey39', 'grey40', 'grey42', 'grey43', 'grey44', 'grey45', 'grey46', 'grey47', 'grey48', 'grey49', 'grey50', 'grey51', 'grey52', 'grey53', 'grey54', 'grey55', 'grey56', 'grey57', 'grey58', 'grey59', 'grey60', 'grey61', 'grey62', 'grey63', 'grey64', 'grey65', 'grey66', 'grey67', 'grey68', 'grey69', 'grey70', 'grey71', 'grey72', 'grey73', 'grey74', 'grey75', 'grey76', 'grey77', 'grey78', 'grey79', 'grey80', 'grey81', 'grey82', 'grey83', 'grey84', 'grey85', 'grey86', 'grey87', 'grey88', 'grey89', 'grey90', 'grey91', 'grey92', 'grey93', 'grey94', 'grey95', 'grey97', 'grey98', 'grey99' ] sg.set_options(button_element_size=(12, 1), element_padding=(0, 0), auto_size_buttons=False, border_width=0) layout = [[ sg.Text( 'Click on a color square to see both white and black text on that color', text_color='blue', font='Any 15') ]] row = [] layout = [] # -- Create primary color viewer window -- for rows in range(40): row = [] for i in range(12):
tooltip=color_map[color]) ], [ sg.Text( 'Hover over button to see color value. Click to clocse and return to main interface.' ) ], ] sg.Window('Buttons with white and black text', layout2, keep_on_top=True).Read() window.close() return sg.set_options(button_element_size=(16, 1), auto_size_buttons=False, border_width=0, tooltip_time=100) # start layout with the tittle layout = [[ sg.Text( 'Hover mouse to see RGB value. Click to see Button with White or Black text.', text_color='blue', background_color='#90EE90', font=('Hevletica', 20), relief=sg.RELIEF_SUNKEN, justification='center', size=(90, 2), pad=(0, 0)) ]]