主题
ThemeColor (属性)
返回或设置指定对象的主颜色。可读/写。
返回值
int
示例
python
# 对当前选定内容应用主题颜色
def test():
Range("A1:A10").Select()
colorStop = Application.Selection.Interior.Gradient.ColorStops.Add(1)
colorStop.ThemeColor = xlThemeColorAccent1
colorStop.TintAndShade = 0
python
#本示例显示活动单元格第三个ColorStop对象的主题颜色是否为 xlThemeColorDark1
def test():
colorStop = ActiveCell.Interior.Gradient.ColorStops.Item(3)
print(colorStop.ThemeColor == xlThemeColorDark1)