Skip to content

Commit

Permalink
Update Html.php
Browse files Browse the repository at this point in the history
  • Loading branch information
oleibman authored May 22, 2024
1 parent 4ede451 commit 7c4eb21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PhpWord/Shared/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ protected static function parseInlineStyle($node, $styles = [])
break;
case 'bgcolor':
// tables, rows, cells e.g. <tr bgColor="#FF0000">
HtmlColours::setArrayColour($styles, 'bgColor', $val);
HtmlColours::setArrayColour($styles, 'bgColor', self::convertRgb($val));

break;
case 'valign':
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 7c4eb21

Please sign in to comment.