更改组合框中每个项目的前景色和背景色

Change each item's foreground and background color in a combobox

我想在 tkinter 中更改 ComboBox 的每个项目的前景色和背景色。我发现这个 可以更改背景下拉菜单的颜色,并且借助那里的答案,我可以使用 root.option_add("*TCombobox*Listbox*Foreground", 'red') 更改项目的前景,但所有内容都在变化,而我想要分别改成不同的前景色和背景色,可以吗?

import tkinter as tk
from tkinter import ttk

root = tk.Tk()
root.option_add("*TCombobox*Listbox*Foreground", 'red')
combo = ttk.Combobox(root, values=[i for i in range(10)]).pack()
root.mainloop()

您不能更改组合框下拉菜单中单个项目的颜色。