Bug 168710 - Text color in chart (auto color) becomes invisible in exported PDF when using dark theme UI
Summary: Text color in chart (auto color) becomes invisible in exported PDF when using...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: target:26.8.0 target:25.8.6 target:26...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Dark-Mode
  Show dependency treegraph
 
Reported: 2025-10-05 18:36 UTC by dogguscy59
Modified: 2026-02-26 12:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bug demonstration (202.84 KB, image/png)
2026-01-20 09:37 UTC, molito
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dogguscy59 2025-10-05 18:36:07 UTC
Description:
(This issue may be design-related rather than a bug, but affects usability and visual consistency.)

When editing a chart in LibreOffice Writer under a dark theme UI, text elements such as chart titles, axis labels, and legend names appear correctly on screen (white on dark background). However, when the document is exported as a PDF, these texts become invisible because the color remains white against a white background.

It seems that “Automatic” text color adapts to the UI theme in the editing view, but this adaptation is not applied during PDF export — the color is exported as-is (white).

Steps to Reproduce:
1. Open LibreOffice Writer (UI theme: Dark Mode enabled).
2. Insert → Chart.
3. Add a chart title and axis labels (keep text color set to “Automatic”).
4. Export the document to PDF.
5. Open the exported PDF and check the chart.

Actual Results:
The text in the chart (titles, labels, legend) is invisible in the exported PDF.

Expected Results:
The automatic text color should adapt to the document background, or be correctly rendered in the PDF output.


Reproducible: Always


User Profile Reset: No

Additional Info:
Workaround:
Manually setting the text color (e.g., black) in the chart resolves the issue.

Environment:
- LibreOffice version: 7.5.3.2 (x86_64)
- OS: Windows 11 Pro (Dark Mode enabled)
- Component: Writer (Chart object)

Suggested Enhancement:
Consider one of the following:
- Make “Automatic” text color theme-aware during PDF export.
- Or, decouple UI theme color from chart element colors to maintain WYSIWYG consistency.
Comment 1 raal 2025-10-07 18:04:15 UTC
I can confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8ea8e254a3151f5390f3a10ff156fcaf8e7c5d5c
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 2 giors_00 2025-10-08 11:06:45 UTC
I can confirm this on cahyos (arch linux)

Version: 25.8.1.1 (X86_64) / LibreOffice Community
Build ID: b8b78ba23aae86d510cf2b39c7a2a9bdb3d77d6a
CPU threads: 4; OS: Linux 6.17; UI render: default; VCL: kf6 (cairo+wayland)
Locale: es-ES (es_ES.UTF-8); UI: es-ES
25.8.1-3.1
Calc: threaded
Comment 3 Timur 2026-01-13 15:03:34 UTC
I did not test original steps with newly created chart, but rather exporting the existing chart, which seems went bad in 24.8:

commit dee3cff90d5d5948e1f8dcba084f192af2e5eb07	[log]
author	Caolán McNamara <caolan.mcnamara@collabora.com>	Sat Jan 27 22:00:15 2024 +0000
Set chart outliner background to the page bg to resolve 'auto' color
when writer does this direct primitive rendering of the chart
Comment 4 Caolán McNamara 2026-01-13 20:03:32 UTC
reverting the identified commit doesn't help
Comment 6 molito 2026-01-20 09:37:12 UTC
Created attachment 205100 [details]
bug demonstration

in dark mode, the text on chart is black and barely invisible.
Comment 7 Commit Notification 2026-02-09 08:19:03 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/36f16718b0e1d668c19e8ff10a14e43fba64dd77

Resolves: tdf#168710 don't use dark/light bg color when printing chart

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Caolán McNamara 2026-02-09 08:21:45 UTC
backports to 26-2 and 25-8 in gerrit
Comment 9 Commit Notification 2026-02-12 13:12:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/c78198dac2abb5bbabd2c98961503cdb10e8d992

Resolves: tdf#168710 don't use dark/light bg color when printing chart

It will be available in 25.8.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2026-02-12 13:13:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/1797ea2d05b5ed462305737af4a55cd1d94fe4ad

Resolves: tdf#168710 don't use dark/light bg color when printing chart

It will be available in 26.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.