Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set font color, no effect #665

Open
XueyuanZhu opened this issue Apr 29, 2024 · 3 comments
Open

Set font color, no effect #665

XueyuanZhu opened this issue Apr 29, 2024 · 3 comments

Comments

@XueyuanZhu
Copy link

My powerpoint Version :PowerPoint2016 MSO(16.0.4266.1001)
textBox.TextFrame!.Paragraphs[0].Portions[0].Font.ColorFormat.SetColorByHex("#FF0000");
The color value has changed,But there is no effect in the ppt.
Below is the code in the PPT when it does not work.
<a:p> <a:pPr> <a:spcBef> <a:spcPct val="0"/> </a:spcBef> <a:buFont typeface="Arial" panose="020B0604020202020204" pitchFamily="34" charset="0"/> <a:buNone/> </a:pPr> <a:r> <a:rPr lang="zh-CN" altLang="en-US" sz="1400" dirty="0"> <a:solidFill> <a:srgbClr val="FF0000"/> </a:solidFill> <a:latin typeface="Arial" panose="020B0503020204020204" pitchFamily="34" charset="-122"/> <a:ea typeface="微软雅黑" panose="020B0503020204020204" pitchFamily="34" charset="-122"/> </a:rPr> <a:t>GoodColor</a:t> </a:r> </a:p>

Here is the code in the PPT when it works.
<a:p> <a:pPr> <a:spcBef> <a:spcPct val="0"/> </a:spcBef> <a:buFont typeface="Arial" panose="020B0604020202020204" pitchFamily="34" charset="0"/> <a:buNone/> </a:pPr> <a:r> <a:rPr lang="zh-CN" altLang="en-US" sz="1600"> <a:latin typeface="微软雅黑" panose="020B0503020204020204" pitchFamily="34" charset="-122"/> <a:ea typeface="微软雅黑" panose="020B0503020204020204" pitchFamily="34" charset="-122"/> <a:solidFill> <a:srgbClr val="FF0000"/> </a:solidFill> </a:rPr> <a:t>GoodColor</a:t> </a:r> </a:p>

It may be the position of 'srgbClr' that determines whether it works properly or not;
This problem may only be found in certain versions of the ppt;

@XueyuanZhu
Copy link
Author

Sorry My description of whether work is the opposite;
not work
1714380303465
work
1714380441964

@ashahabov
Copy link
Member

ashahabov commented May 4, 2024

@XueyuanZhu, could you please share sample of presentation file (Bug Report). It would help to reproduce this issue.

@ashahabov
Copy link
Member

@XueyuanZhu ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants