是否有 python-pptx 函数能够读取 table 单元格的背景颜色?

Is there a python-pptx function that is able to read the background color of a table cell?

我正在尝试使用 python-pptx 模块读取 pptx 文件中 table 单元格的背景颜色,但我只能设置 _Cell 的填充 属性,无法从中读取值。

我尝试读取 fill.back_color,但在执行 fill.patternize() 之后它们都是 (255,255,255),正如输出所示。我究竟做错了什么?或者我应该使用另一个包?

我的 pptx 文件不是用 python 制作的。

正如@scanny 指出的那样,fill.back_color 用于图案填充。对于单元格颜色,我应该从 fill.fore_color.

读取