我希望能够使用自定义颜色,但似乎无法绕过styleColor常量。如何输入我自己的颜色,如#008080
// Create slide
echo date('H:i:s') . ' Create slide'.EOL;
$oSlide1 = $objPHPPresentation->getActiveSlide();
$oSlide1->addShape(clone $oShapeDrawing);
$oSlide1->addShape(clone $oShapeRichText);
// Slide > Background > Color
$oBkgColor = new Color();
$oBkgColor->setColor(new StyleColor(StyleColor::COLOR_DARKGREEN));
$oSlide1->setBackground($oBkgColor);
答案 0 :(得分:0)
// Create slide
echo date('H:i:s') . ' Create slide'.EOL;
$oSlide1 = $objPHPPresentation->getActiveSlide();
$oSlide1->addShape(clone $oShapeDrawing);
$oSlide1->addShape(clone $oShapeRichText);
// Slide > Background > Color
$oColor = new StyleColor();
$oColor->setRGB('008080');
$oBkgColor = new Color();
$oBkgColor->setColor($oColor);
$oSlide1->setBackground($oBkgColor);