Bug 152999 - UI: Document background color in settings overrides cell background colors in Calc
Summary: UI: Document background color in settings overrides cell background colors in...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-12 22:11 UTC by Jens
Modified: 2024-01-08 21:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Libreoffice Calc UI with text colors and "Libreoffice" theme (24.22 KB, image/png)
2023-01-13 20:29 UTC, Jens
Details
Libreoffice Writer UI with text colors and "Libreoffice" theme (49.23 KB, image/png)
2023-01-13 20:41 UTC, Jens
Details
Calc cell colors with dark/light color scheme (27.99 KB, image/png)
2023-09-14 15:19 UTC, Jens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jens 2023-01-12 22:11:01 UTC
Description:
I am using a dark theme (Breeze dark) on KDE Neon (Ubuntu based) and until recently (7.4?) Libreoffice applied this to the UI, but not to the document area, which was fine to me.

Now the dark theme is also applied to the document background (previously this was always white), which *would* be fine it Libreoffice *also* inverted the text and text/cell/object background brightnesses so that documents stayed legible even with a dark document canvas. (This is roughly what Microsoft does when using a dark theme in Office and it makes a lot of sense.)

Even worse, if I set a manual document background in the settings, this is applied, but then *overrides* any cell background or font background defined in documents.

IMHO, at least the last thing is a bug:
LibreOffice's theme/color settings should not override colors defined within documents. Either this should be fixed or we need two more checkboxes in the style settings:

[x] These settings override colors defined within documents
and
[x] Invert brightness of colors defined within documents (use this for dark document backgrounds)

Steps to Reproduce:
1. Configure dark theme on KDE Neon (Breeze dark)
1a. Configure "Document background color" to be "white", not auto
2. Open Libreoffice, also configure dark theme
3. Open a Calc document which has cell background colors defined

Actual Results:
Cell background colors are not visible in the document. Other colors are visible.

Expected Results:
Cell background colors should be applied and visible.
(Possibly as an option, but as the default option.)


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Rafael Lima 2023-01-13 18:56:11 UTC
When using a dark theme in KDE, if you want the document background to be white (with black text), you need to use the "LibreOffice" color scheme.

To do that:
1) Go to Tools - Options - Application Colors
2) Under "Color scheme" choose "LibreOffice"
3) Make sure all colors are set to "Automatic"
4) Click OK

This should fix the problem. Let me know if the problem persists.
Comment 2 Jens 2023-01-13 20:29:55 UTC
Created attachment 184647 [details]
Libreoffice Calc UI with text colors and "Libreoffice" theme

Hello,

Thank you for helping!
I am using this theme. However, all colors seem inverted.
Also, cell background colors are not applied.
I can set the "Document background color" to white manually but then also all background and fill colors *within the document* are also ignored.

Note that this is also regardless of the icon theme (I chose one with good contrast).

How can I fix this?
Comment 3 Jens 2023-01-13 20:41:55 UTC
Created attachment 184650 [details]
Libreoffice Writer UI with text colors and "Libreoffice" theme

Similarly in Libreoffice Writer.

Currently it doesn't seem possible to have a dark mode Desktop theme but a white document background color AND have content backgrounds within the document.
Comment 4 QA Administrators 2023-01-14 03:26:07 UTC Comment hidden (obsolete)
Comment 5 Jens 2023-01-15 14:55:09 UTC
Update: Actually, by deleting my user profile and starting from scratch (*and* upgrading LibreOffice to

Version: 7.4.4.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Ubuntu package version: 1:7.4.4~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded

), I was able to solve the "colors not displayed" issue. Document colors are now displayed correctly both with Libreoffice and LibreOffice Dark color theme.

However, the brightness inversion I was suggesting for the "Libreoffice Dark" scheme doesn't yet exist. Is there an easy way for me to experiment with this, without having to set up a complete build environment? I would like to make a suggestion.
Comment 6 Buovjaga 2023-03-17 12:25:21 UTC
There were many changes for dark mode in 7.5. Is there still something to be done here?

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 7 QA Administrators 2023-09-14 03:06:05 UTC Comment hidden (obsolete)
Comment 8 Jens 2023-09-14 15:18:28 UTC
Hello,
the inconsistency wit background colors seems resolved and both dark and normal (white) Libreoffice themes now behave predictably.

However, the *brightness* of manually set colors is not (yet) inverted. This results in strong contrasts between colors when switching between dark and bright color schemes.

In the attached example, I would have expected the chosen "light yellow" color of the red text to be inverted in brightness for the dark background as well, so that there is not such a large contrast, similarly to the comment background color.

This would require a dynamic adjustment of all color values (or an inverted color palette) for dark mode, and I don't see this implemented yet (but that may be me).
Comment 9 Jens 2023-09-14 15:19:54 UTC
Created attachment 189570 [details]
Calc cell colors with dark/light color scheme
Comment 10 QA Administrators 2023-09-15 03:06:08 UTC Comment hidden (obsolete)
Comment 11 Jens 2023-09-15 20:14:06 UTC
I already tagged this bug as UNCONFIRMED yesterday and provided additional info ...?
Comment 12 Buovjaga 2023-09-16 05:26:30 UTC
(In reply to Jens from comment #11)
> I already tagged this bug as UNCONFIRMED yesterday and provided additional
> info ...?

Apologies, the automated system has an issue
Comment 13 Jens 2023-09-16 09:34:46 UTC
Thought so, no problem :-)
Comment 14 Stéphane Guillou (stragu) 2024-01-08 21:40:54 UTC
Given that the original bug(s) is resolved, let's close this report as "works for me".

Regarding 8, I understand it as a distinct enhancement request that asks for an option to update manually applied colours (direct formatting, modified styles...), inverting their brightness so the contrast between elements in the document does not change. Or is it only about colours in the Application Colours that are not "automatic"?
In any case, please open a fresh report for such an enhancement request, so we have a clear description to work from. (And a sample document with precise steps would help describing the issue better.)

Thank you!