We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cf6299 commit 900e880Copy full SHA for 900e880
pydocx/openxml/wordprocessing/table_cell_properties.py
@@ -6,6 +6,7 @@
6
)
7
8
from pydocx.models import XmlModel, XmlChild
9
+from pydocx.constants import COLOR_FOR_DARK_BACKGROUND
10
11
12
class TableCellProperties(XmlModel):
@@ -30,10 +31,8 @@ def should_close_previous_vertical_merge(self):
30
31
32
@property
33
def background_color(self):
- background_fill = getattr(self, 'background_fill', None)
34
-
35
# There is no need to set white background color
36
- if background_fill not in ('auto', 'FFFFFF'):
37
- return background_fill
+ if self.background_fill not in ('auto', COLOR_FOR_DARK_BACKGROUND):
+ return self.background_fill
38
39
return None
0 commit comments