Bug 167562 - Summary: "Automatic" font color in Calc fails to provide sufficient contrast for wrapped text in dark mode, appearing dark on dark, while unwrapped text correctly appears light on dark.
Summary: Summary: "Automatic" font color in Calc fails to provide sufficient contrast ...
Status: RESOLVED DUPLICATE of bug 166838
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-18 07:42 UTC by CalvinChai
Modified: 2025-09-16 07:39 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Font color automatic setting in dark mode (32.48 KB, image/png)
2025-07-18 07:42 UTC, CalvinChai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CalvinChai 2025-07-18 07:42:53 UTC
Created attachment 201864 [details]
Font color automatic setting in dark mode

When LibreOffice Calc is configured with a dark application background (either via System theme following OS dark mode, or explicitly set in Application Colors), the "Automatic" font color setting behaves inconsistently.

For short sentences or text that does not wrap within a cell, the "Automatic" font color correctly renders as a light color (e.g., white) against the dark cell background, ensuring good readability on screen.

However, for long sentences or text that does wrap within the same cell (with "Wrap text automatically" enabled), the "Automatic" font color incorrectly renders as a dark color (e.g., black or dark grey) against the dark cell background. This makes the wrapped text unreadable on screen.

This issue forces users to manually set the font color to white for readability, which then causes a printing problem (white text on white paper becomes invisible). The "Automatic" font color should ideally adapt for both screen display (dark background -> light font) and printing (white paper -> dark font). The current behavior for wrapped text breaks this expected functionality.

Steps to Reproduce:

Ensure your LibreOffice UI is set to a dark theme:

Go to Tools > Options > LibreOffice > View.

Set "Mode" to "Dark" (or "System" if your Windows 10 OS is already in Dark Mode).

Ensure your Calc document background is dark:

Go to Tools > Options > LibreOffice > Application Colors.

Under "Color scheme," set "Document background" to a dark color (e.g., "Black" or "Dark Grey 3").

Ensure "Font color" is set to "Automatic".

Click "OK" and restart LibreOffice Calc if prompted.

Open a new or existing Calc spreadsheet.

In a cell (e.g., A1), type a short sentence that does not require wrapping (e.g., "Short text"). Observe its font color.

In another cell (e.g., A2), type a very long sentence that will definitely require wrapping (e.g., "This is a very long sentence that will extend beyond the current column width and force the text to wrap automatically within the cell, demonstrating the issue clearly.").

Ensure "Wrap text automatically" is enabled for cell A2:

Select cell A2.

Go to Format > Cells... > Alignment tab.

Check the box for "Wrap text automatically."

Adjust the column width of A2 so that the text wraps onto multiple lines.

Actual Results:

The short sentence in A1 (unwrapped) correctly displays with a light font color (e.g., white) on the dark background.

The long sentence in A2 (wrapped) incorrectly displays with a dark font color (e.g., black or dark grey) on the dark background, making it unreadable on screen.

Expected Results:

Both unwrapped and wrapped text with "Automatic" font color should display with a light font color (e.g., white) on a dark screen background to ensure readability.

The "Automatic" font color should correctly switch to a dark color (e.g., black) when the document is printed on a white background.

Additional Information:

UI render: Skia/Raster

VCL: win

Locale: en-MY (en_MY); UI: en-GB

Calc: threaded

This issue forces a workaround of manually setting font color to white for wrapped text, which then creates a problem for printing (invisible text on white paper).

A sample .ods file demonstrating the issue would be helpful to attach to the bug report.
Comment 1 J22Gim 2025-09-16 07:39:10 UTC
I can confirm this.

I believe it is a duplicate of 166838
https://bugs.documentfoundation.org/show_bug.cgi?id=166838

*** This bug has been marked as a duplicate of bug 166838 ***