The point of the ttk theming support is to get the system provided theming engine to draw the various elements that make up a Tk widget so that we match the current UI's look and feel. In the case of the Notebook Tab on Windows Vista or above that means the 'vsapi' engine is being used to draw the elements. The tab is an element and it's look is provided by the Windows theme. For this reason it doesn't provide any way to modify the background as that is done by selecting an alternative Windows theme.
However, what you can do is select an element from a different ttk theme that does support changing the background style. This may not match closely in other ways but you are already diverging from the system provided theme. The way to completely control the look of your element is to create a new element using the 'image' engine and provide images to be used to paint the element. A simpler method is to borrow an element from one of the other themes. The 'default' theme provides support for specifying the color of the tab element so we could borrow that by recreating the element and redefining the TNotebook layout to use the new element.
# Import the Notebook.tab element from the default theme
noteStyler.element_create('Plain.Notebook.tab', "from", 'default')
# Redefine the TNotebook Tab layout to use the new element
noteStyler.layout("TNotebook.Tab",
[('Plain.Notebook.tab', {'children':
[('Notebook.padding', {'side': 'top', 'children':
[('Notebook.focus', {'side': 'top', 'children':
[('Notebook.label', {'side': 'top', 'sticky': ''})],
'sticky': 'nswe'})],
'sticky': 'nswe'})],
'sticky': 'nswe'})])
noteStyler.configure("TNotebook", background=COLOR_1, borderwidth=0)
noteStyler.configure("TNotebook.Tab", background="green", foreground=COLOR_3,
lightcolor=COLOR_6, borderwidth=2)
noteStyler.configure("TFrame", background=COLOR_1, foreground=COLOR_2, borderwidth=0)
The options made available depend on the theming engine in use to some extent and the Windows theme is more restrictive than most because the drawing of the elements is handed over to a third party. Extreme customisation is possible but does require redefining the widget layout. This is mentioned in the python ttk docs but unless you know something about how ttk widgets are designed it's not that obvious what to do. The design intent is that you don't make such extreme customization but make your application conform to the users selected platform look and feel. But the tools are available - just buried quite deeply. Here is another link to a Tcl example that adds close buttons to the tabs
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…