设置单元格颜色时出错

Error while setting the color of a cell

我正在尝试使用 openpyxl 设置单元格的颜色,但是我得到:

AttributeError: type object 'Color' has no attribute 'DARKYELLO

这是代码:

from openpyxl import load_workbook
from openpyxl.styles import Font, Style
from openpyxl import Workbook
from openpyxl.writer.styles import StyleWriter
from openpyxl.styles import  Border, Color, Font
# ...
self.bworkSheet["A" + str(self.indexLine)].style.fill.start_color = Color.DARKYELLOW
self.bworkSheet["A" + str(self.indexLine)].value = "Duplicate Photo"

样式是不可变的,一旦创建就无法更改。