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 13fc647 commit e40449eCopy full SHA for e40449e
src/PhpWord/Writer/HTML/Element/Table.php
@@ -53,10 +53,10 @@ public function write()
53
$cellBgColor = $cellStyle->getBgColor();
54
$cellFgColor = null;
55
if ($cellBgColor) {
56
- $r = hexdec(substr($cellBgColor, 0, 2));
57
- $g = hexdec(substr($cellBgColor, 2, 2));
58
- $b = hexdec(substr($cellBgColor, 4, 2));
59
- $cellFgColor = (($r * 0.299 + $g * 0.587 + $b * 0.114) > 186) ? null : 'ffffff';
+ $red = hexdec(substr($cellBgColor, 0, 2));
+ $green = hexdec(substr($cellBgColor, 2, 2));
+ $blue = hexdec(substr($cellBgColor, 4, 2));
+ $cellFgColor = (($red * 0.299 + $green * 0.587 + $blue * 0.114) > 186) ? null : 'ffffff';
60
}
61
$cellColSpan = $cellStyle->getGridSpan();
62
$cellRowSpan = 1;
0 commit comments