Created attachment 188996 [details] Screenshots demonstrating behavior Whenever the High Contrast accessibility option is enabled, cell backgrounds are not visible. Although I tested on Ubuntu only, this bug seems to affect Windows OS as well (based on Google search). Steps to reproduce: - Open LibreOffice Calc - File > New > Spreadsheet - Select any cell - Format > Cells... - Background tab - Color button - Select any color (other than White or a color similar to the default cell background color) - OK button - go to OS accessability features, turn on high contrast mode - in Ubuntu 22, use Settings > Accessibility > Seeing > High Contrast - check the spreadsheet display on screen - expected behavior: the cell background color is still visible - actual behavior: the cell is displayed with default background color (usually white) In addition, the color is also invisible on the cell formatting dialog (Format > Cells > Background > Color). Version: 7.3.7.2 Package: 1:7.3.7-0ubuntu0.22.04.3 UI language: en-US locale: hu-HU OS: Ubuntu 22.04.3 LTS (64 bit) GNOME Version 42.9 Windowing: Wayland HW: Lenovo Thinkpad E495 / AMD® Ryzen 7 3700u with radeon vega mobile gfx × 8 / AMD® Radeon vega 10 graphics / 24 GiB RAM See attached pdf for screenshots. Note: in addition to the cell background color being lost when high contrast is turned on, the window / menu / icon rendering is also wrong in dark mode+high contrast, but this is probably a separate bug.
Created attachment 188997 [details] Sample document used on the screenshots
Created attachment 188998 [details] Screenshots demonstrating behavior
Created attachment 188999 [details] Screenshots demonstrating behavior
This bug has been present for a long time. Google search yields several times it has been discovered and attributed to OS high contrast setting. Different platforms / LO versions all exhibit same (wrong) behavior See these older discussions where the exact same problem has been reported over the years: https://forum.openoffice.org/en/forum/viewtopic.php?t=54724 https://ask.libreoffice.org/t/cell-colour-does-not-change/44265 https://forum.manjaro.org/t/no-libreoffice-calc-cell-background-colours-after-updates/122066 https://ask.libreoffice.org/t/cell-background-is-invisible/35947/4 https://ask.libreoffice.org/t/calc-cell-background-color-not-visible-on-active-spreadsheet/12389
Also on Windows.
fg/bg contrast tests were recently reworked for bug 156182 and will land in 24.2.0 Please retest with current master, a 7.3.7.2 build is hopelessly out of date and does not include any of the Dark mode related adjustments that respond to os/DE HighContrast in general. @ady, what build and Windows os/DE for you?
(In reply to V Stuart Foote from comment #6) > Please retest with current master, a 7.3.7.2 build is hopelessly out of date As far as I understand 7.3.7.2. is the current release on Ubuntu 22 LTS, which is the current LTS OS release. Does not seem to be out of date, much less hopelessly.
(In reply to V Stuart Foote from comment #6) > Please retest with current master I downloaded 7.5.5.2 from the LibreOffice Fresh PPA. Issue still present. I don't know what current master is but this is the latest build I can install. Version: 7.5.5.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: hu-HU (en_US.UTF-8); UI: en-US Ubuntu package version: 4:7.5.5~rc2-0ubuntu0.22.04.1~lo1 Calc: threaded
7.3.7 was EOL Nov 2022, fine to use but no project development action after that date. [1] That is why we will insist on testing against current release builds. 7.5.5.2 is the current 7.5 "Still" release build, while for the current 7.6 7.6.0.3 is the current "Fresh" release build, coming out of "pre-Release" with 7.6.1.1 due next week. 7.4.7 went EOL Jun 2023. 7.6 builds will roll to PPA at some point. Meanwhile do check with your 7.5.5.2 build from PPA, that has most of the dark theme support rework already with some additional tweaks done for 7.6 including os/DE declared HC, and then the substantial bug 156182 fg/bg adjustment coming at 24.2 that is only available via nightly builds (requiring DEB package and install in parallel with profile rename [2]). And if you prefer not to update from PPA there are FlatPack, Snap, and AppImage of recent release builds that can be used instead. =-ref-= [1] https://wiki.documentfoundation.org/ReleasePlan [2] https://wiki.documentfoundation.org/Installing_in_parallel/Linux
(In reply to V Stuart Foote from comment #9) > Meanwhile do check with your 7.5.5.2 build from PPA, I did, see comment #8 above. issue still present This is a business notebook I use every day so I prefer not to mess with it, I need it for work every day. It has an LTS OS release installed (probably that is why the libreoffice fresh PPA gave me 7.5.5.2 only? - just guessing). Anyway this is a very simple issue to reproduce, can someone else test it in latest build?
Created attachment 189007 [details] All 4 Windows 10 os/DE HC modes on LO 7.6.0 as can be seen in attached PNG, this set of clips was done on Windows 10 and LibreOffice 7.6.0 for each of the 4 predefined Windows 10 os/DE HC modes. The cell bg colors follow the os/DE HC theme Did not test on Windows 11 where Microsoft reworked the visibility themes, but expect similar behavior there with LibreOffice builds > 7.6 Version: 7.6.0.1 (X86_64) / LibreOffice Community Build ID: 776eaf34564cbf3f034a0ba1fd1d5c32ff9ccf1c CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded
(In reply to V Stuart Foote from comment #11) > The cell bg colors follow the os/DE HC theme As expected. The bug manifests if you set a background color on the cell. I assume these screenshots show cells without any fill, so do not seem relevant here.
OK, now I see the perceived issue. Perceived in that LO is handling HC theme exactly as it should, with the UI rendered in a reduced color palette as passed in from the os/DE. User applied colors in the UI are ignored when os/DE signals HC in use and instead follows the HC theme provided. Believe this is by design HC theme handling. Not clear we need do more as it would need a whole new theming logic to selectively adjust UI elements to "complement" the HC theme in use--where now such elements are ignored.
Created attachment 189014 [details] Additional content examples (In reply to V Stuart Foote from comment #13) > Believe this is by design HC theme handling. > > Not clear we need do more as it would need a whole new theming logic to > selectively adjust UI elements to "complement" the HC theme in use--where > now such elements are ignored. If this is by design, it certainly is very confusing. I checked some more user content and HC display behavior is very inconsistent (colors not always ignored) - font colors are retained - background colors are ignored - conditional background colors, however are retained - border colors are replaced by gray - arrows lose arrowheads - bars in charts are invisible see new examples attached when viewed with HC. I am not sure it is a good idea to adjust anything on user objects.
(In reply to V Stuart Foote from comment #13) > OK, now I see the perceived issue. Perceived in that LO is handling HC theme > exactly as it should, with the UI rendered in a reduced color palette as > passed in from the os/DE. > > User applied colors in the UI are ignored when os/DE signals HC in use and > instead follows the HC theme provided. > > Believe this is by design HC theme handling. > > Not clear we need do more as it would need a whole new theming logic to > selectively adjust UI elements to "complement" the HC theme in use--where > now such elements are ignored. How users are supposed to understand how to ("correctly") use the color palette for the background color of a cell in Calc with this setting enabled? If there is some limitation based on OS/DE, then: * users have no way to know how to select the "compatible" colors in LO/Calc (if there is really such a thing); and, * users cannot share documents/spreadsheets, if the colors are not seen by some other OS/DE (in the intended way, or at all); and, * users have no idea whether some OS setting needs to be changed in order to be able to use this feature in LO/Calc. If the only standard colors that are clearly-usable are black and white, then I don't understand the purpose of having a "High contrast" setting. I might be misunderstanding this feature. If this setting depends/needs/complements some OS setting, it is not clearly understood from LO/Calc's (options) UI/UX. FWIW, as mentioned in comment 0, this issue is not new, and it is also seen in recent LO Dev 24.2 versions on MS Windows too. Setting to NEW (again), so these points can be addressed. This might not be a bug from the POV of how it was intended by developers, but at least a lot of tool-tips, help content and/or wiki pages seem to be needed for users to be able to "correctly" use this feature (or, even better, improve the feature itself). For instance, maybe the "High contrast" label should mention something about "OS-related" in some way; I'll leave the adequate term to UX team. Quoting from Help content: " The cell background color is ignored then. " ... which would mean _no_ color palette is supported, at all. What's the point of "High Contrast" then? Perhaps it should be named Black/White (Contrast) only? I'm at least confused. IOW, the feature (and its UI text) is far from clear/intuitive/understandable for users ATM.
Yeah, this is apparently by design. Maybe following the "letter of the law" for some compliance effort in the past, I find the outcome quite odd but there is quite a lot of built-in code that works hard to provide this result for high contrast accessibility. IIRC when I enable a similar setting in e.g. MSOffice I get fairly bizarro-land results too. I tried to cover what I know in slide 7 of https://fosdem.org/2023/schedule/event/lotech_darkmodes/ which I'll paste here: << Accessibility High Contrast Mode May not be a dark mode, but often is, but this is a special mode. We make a special effort to follow these rules, with arguably strange results: * learn.microsoft.com/en-us/windows/win32/winauto/high-contrast-parameter “Map all colors to a single pair of foreground and background colors. Use the GetSysColor function to determine the appropriate foreground and background colors, using either a combination of COLOR_WINDOWTEXT and COLOR_WINDOW or a combination of COLOR_BTNTEXT and COLOR_BTNFACE. The GetSysColor function returns the colors selected by the user through the Control Panel. * Omit any bitmapped images that would typically be displayed behind text. Such images are visually distracting to a user who needs high contrast. Images that would typically be drawn in multiple colors should be drawn using the foreground and background colors selected for text.” >> I don't know if Michael W. has any specific insight into if we're doing this right at all, but I think this old a11y recommendation is why we end up like this.
Agree with Ady that this is implemented in a weird way. Plus, switching on via "[x] Automatically detect high contrast mode of OS" under tools > options > a11y is pretty awkward. Besides the question if we need to modify colors at all I believe the configuration should not be affected, in other words the dialog should still show the actual color. Michael, what is your recommendation? Keep colors depending on HC and fix issues (see c14) or drop it and limit HC to the UI only (my preference).
Created attachment 189020 [details] Screenshot of the sample document in Excel with High Contrast Black enabled
Created attachment 189021 [details] Screenshot of the sample document in Excel with High Contrast White enabled
From looking at this a bit: Excel seems to do the same as Calc and doesn't render the cell background when High Contrast is enabled, s. screenshosts attachment 189020 [details] and attachment 189021 [details], so seems to adhere to what Caolán quoted in comment 16. (In reply to Heiko Tietze from comment #17) > Besides the question if we need to modify colors at all I believe the > configuration should not be affected, in other words the dialog should still > show the actual color. That sounds reasonable to me when it's about explicitly selecting a specific color. > Michael, what is your recommendation? Keep colors depending on HC and fix > issues (see c14) or drop it and limit HC to the UI only (my preference). I think dropping the feature completely would be unfortunate, because I'd assume there are people that actually want high contrast in the document, which the current behavior ensures (and Excel on Windows does as well, s. above). Ideally, we should probably support what the corresponding platform understanding of what a "High Contrast mode" is. For the gtk3 VCL plugin, I'm wondering whether we need to have any specific code for the case of only covering the UI but not the document or whether this is already covered by the theme, i.e. whether switching to High Contrast in GNOME settings "just" sets a corresponding theme and icon theme and LO already does what it should because it supports themes. @Balázs: Do you get the expected overall result when disabling the "Automatically detect high contrast mode of OS" or is anything in LO then not using high contrast where you'd expect it?
> > @Balázs: Do you get the expected overall result when disabling the > "Automatically detect high contrast mode of OS" or is anything in LO then > not using high contrast where you'd expect it? First, I have no such setting per se. Instead, on my system, I have a selection of 3 options under Tools > Options > LibreOffice > Accessibility > Options for High Contrast Appearance > High Contrast, these are "Automatic", "Disable" and "Enable". I guess functionally this is similar to what you refer to? Anyway, if I select "Disable" there, the document user content seems to display all colors, ignoring the HC setting in OS. The window/UI components are still in HC mode, whatever that is supposed to be (e.g. different icon set, but not *that much* different, so the intended result here is also questionable - this is a separate issue probably). I think some context is needed: I filed this report because the HC setting had been turned on accidentally and the documents I worked with looked very awkward, some parts completely, some nearly illegible (e.g. charts and cells with colored background). This is different from someone deliberately turning on HC mode and not getting a reasonable display of their document. I was at a loss because I was unaware of the HC setting and had to investigate what on earth was going on. I suspect that most of the cases linked in comment #4 are similar. My point is that there are 2 distinct scenarios and two disjoint sets of affected users: (A) HC turned on deliberately and (B) HC turned on accidentally, as seems to be the case for some people (N.B. I still do not know, and probably never will, why the HC setting had been turned on on my system; I did not recall ever touching the OS display settings when the whole thing occurred.) I can only speak for group (B), as I never use HC deliberately. The documents were unusable, the display looked wrong and I had to google for hours (not knowing what I was searching for) to find the cause. After finding the cause it seemed that this is a bug (I am not quite sure any more based on the comments above). However, what I am quite sure is this: if HC is turned on accidentally, the current behavior is very confusing. In addition, I suspect there are many users out there like me who have not the faintest idea that (i) such a setting exists and (ii) it can be "mysteriously" activated somehow.
Maybe default setting to automatically follow OS high contrast setting (at least on the document user content) is not a good idea? I checked Firefox and Chrome, neither browser does anything when I turn on HC in OS. I do not even find a setting for that, only some high color themes/extensions that have to be manually downloaded/installed/activated. In fact not much changes on my display (hence the confusion) when I turn HC on. Some applications (e.g. Sytem settings, Evolution mail) change the icon set and highlight color, but the result is not that much different. I don't find any other application that changes the display of user editable content for HC mode. Ideal solution would be to detect HC setting being turned on for the first time and display a dialog asking what to do with document content. This would solve the issue with accidental HC setting and still enable HC display for those that turned it on deliberately.
As in comment 13 and comment 16 the os/DE signaled HC mode handling is by design. Sorry but for those finding themselves having set the os/DE to HC we need to honor such signal from os/DE by default--and yes it explicitly will change colors of document objects. That is the nature of this Assistive Technology noting that other than colors, we also shift into our designated monochrome HC icon theme--Sifr (in a light or dark flavor depending on fg/bg color of the HC theme). IMHO all of this is correct, and we provide suitable controls in the Tools --> Options --> Accessibility High Contrast options of 'Automatic', 'Disabled', 'Enabled'. I would say it is a RTM issue, but agree it could be better documented for folks that find themselves lost. As to enhancement to implement additional support for HC color values for additional document objects--that would need accessibility and UX design work of what would need to be parallel implementation paths of current core handling. Other than documentation effort, IMHO this is a clear WONTFIX
(In reply to V Stuart Foote from comment #23) > As in comment 13 and comment 16 the os/DE signaled HC mode handling is by > design. Yes, this seems to be the case. However, as already mentioned in comment #14, the current solution is very limited and inconsistent. It may even make the document illegible in extreme cases (e.g. white font on black background disappears completely). The spreadsheets that I use every day look completely rubbish if HC is turned on. The idea of HC is to make the document easier to read. The current solution does the opposite. It makes the document harder or sometimes impossible to read. In my opinion it would be much better not to change the display of colors set by users until a full HC rendering can be produced. A solution that can handle background color, font, conditional formatting of cells, conditional formatting of number colors, drawing objects, charts, etc. ( Basically all objects where the user can change the display color) consistently. Until then, this is a bug, not a feature.
(In reply to Balázs from comment #24) Are you claiming this from an accessibility perspective, or from a general 'Benjamin' user's perspective. Our a11y Assistive Technology HC accommodation of table (calc & writer) colors is appropriate for users working with an os/DE signal flag for HC use. Color handling for other users is unaffected and follows both theme and document template values. IMHO NAB, and no compelling reason to enhance/refactor for HC use. If you don't require HC, then do not set your os/DE HC mode, that is an a11y AT--don't abuse it.
(In reply to V Stuart Foote from comment #25) > Are you claiming this from an accessibility perspective, or from a general > 'Benjamin' user's perspective. Does not matter. I provided plenty of examples where HC setting ruins the document display. Is it useful for anyone if document is illegible? I do not think so. > If you don't require HC, then do not set your os/DE HC mode, that is an a11y > AT--don't abuse it. Obviously, although I do not understand the intended meaning of 'abuse' here. If you like unreadable documents, just leave it as it is now.