I want to apply different background for tags in Treeview but when I set tag for example as \"minus\" and try to configure tag to have black background it stills returns white b
A solution is found at: https://bugs.python.org/issue36468
According to the link, the issue is with the Tkinter version. People are thinking the issue is with the Python version but that is because the Python version uses the faulty Tkinter version.
def fixed_map(option):
# Fix for setting text colour for Tkinter 8.6.9
# From: https://core.tcl.tk/tk/info/509cafafae
#
# Returns the style map for 'option' with any styles starting with
# ('!disabled', '!selected', ...) filtered out.
# style.map() returns an empty list for missing options, so this
# should be future-safe.
return [elm for elm in style.map('Treeview', query_opt=option) if
elm[:2] != ('!disabled', '!selected')]
style = ttk.Style()
style.map('Treeview', foreground=fixed_map('foreground'),
background=fixed_map('background'))