Skip to content

Commit cc35e14

Browse files
committed
Begin replacing Font::FGCOLOR with Color
1 parent 1422172 commit cc35e14

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

samples/Sample_20_BGColor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
$section->addText(
1313
'This is some text highlighted using fgColor (limited to 15 colors)',
14-
['fgColor' => PhpOffice\PhpWord\Style\Font::FGCOLOR_YELLOW]
14+
['fgColor' => PhpOffice\PhpWord\SimpleType\Color::YELLOW]
1515
);
1616
$section->addText('This one uses bgColor and is using hex value (0xfbbb10)', ['bgColor' => 'fbbb10']);
1717
$section->addText('Compatible with font colors', ['color' => '0000ff', 'bgColor' => 'fbbb10']);

tests/PhpWordTests/Style/FontTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
use PhpOffice\PhpWord\PhpWord;
2222
use PhpOffice\PhpWord\Settings;
23+
use PhpOffice\PhpWord\SimpleType\Color;
2324
use PhpOffice\PhpWord\SimpleType\Jc;
2425
use PhpOffice\PhpWord\Style\Font;
2526
use PhpOffice\PhpWord\Style\Language;
@@ -115,7 +116,7 @@ public function testSetStyleValueNormal(): void
115116
'doubleStrikethrough' => false,
116117
'smallCaps' => true,
117118
'allCaps' => false,
118-
'fgColor' => Font::FGCOLOR_YELLOW,
119+
'fgColor' => Color::YELLOW,
119120
'bgColor' => 'FFFF00',
120121
'lineHeight' => 2,
121122
'scale' => 150,

0 commit comments

Comments
 (0)