Skip to content

Commit 7c4eb21

Browse files
authored
Update Html.php
1 parent 4ede451 commit 7c4eb21

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PhpWord/Shared/Html.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected static function parseInlineStyle($node, $styles = [])
147147
break;
148148
case 'bgcolor':
149149
// tables, rows, cells e.g. <tr bgColor="#FF0000">
150-
HtmlColours::setArrayColour($styles, 'bgColor', $val);
150+
HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($val));
151151

152152
break;
153153
case 'valign':
@@ -726,11 +726,11 @@ protected static function parseStyleDeclarations(array $selectors, array $styles
726726

727727
break;
728728
case 'color':
729-
HtmlColours::setArrayColour($styles, 'color', $value);
729+
HtmlColours::setArrayColour($styles, 'color', self::convertRgb($value));
730730

731731
break;
732732
case 'background-color':
733-
HtmlColours::setArrayColour($styles, 'bgColor', $value);
733+
HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($value));
734734

735735
break;
736736
case 'line-height':

0 commit comments

Comments
 (0)