Skip to content

Support theme colors as highlight color in pptx. - #1174

Merged
jaragunde merged 1 commit into
apache:trunkfrom
jaragunde:pptx-text-highlight-color
Jul 2, 2026
Merged

Support theme colors as highlight color in pptx.#1174
jaragunde merged 1 commit into
apache:trunkfrom
jaragunde:pptx-text-highlight-color

Conversation

@jaragunde

Copy link
Copy Markdown
Member

Although the PowerPoint UI doesn't allow it, it's possible to use a theme color for text highlight. Some external software seems to do it, and PowerPoint displays the highlight correctly.

In POI we expected the highlight color to always be srgbClr, or return null. In POI 5.5.x it was even a crash, the null check was added later.

We change fetchHighlightColor to use XSLFColor to determine the color instead of reading the RGB directly. That class supports the different XML tags that implement colors in OOXML.

Although the PowerPoint UI doesn't allow it, it's possible to use a
theme color for text highlight. Some external software seems to do it,
and PowerPoint displays the highlight correctly.

In POI we expected the highlight color to always be srgbClr, or return
null. In POI 5.5.x it was even a crash, the null check was added later.

We change fetchHighlightColor to use XSLFColor to determine the color
instead of reading the RGB directly. That class supports the different
XML tags that implement colors in OOXML.
@jaragunde
jaragunde marked this pull request as ready for review July 2, 2026 15:42
@jaragunde
jaragunde merged commit 0f4b50b into apache:trunk Jul 2, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

1 participant