diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 5f50e644c3..f64dc30466 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -147,7 +147,7 @@ protected static function parseInlineStyle($node, $styles = []) break; case 'bgcolor': // tables, rows, cells e.g. - HtmlColours::setArrayColour($styles, 'bgColor', $val); + HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($val)); break; case 'valign': @@ -726,11 +726,11 @@ protected static function parseStyleDeclarations(array $selectors, array $styles break; case 'color': - HtmlColours::setArrayColour($styles, 'color', $value); + HtmlColours::setArrayColour($styles, 'color', self::convertRgb($value)); break; case 'background-color': - HtmlColours::setArrayColour($styles, 'bgColor', $value); + HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($value)); break; case 'line-height':