In the example file you use 3 styles for conditional formatting: "Utitled1"
(for RED), "GREEN"
and "YELLOW"
.
Out of those, GREEN and RED does hide the cell background, if applied, but YELLOW does not, so YELLOW already does what you want. (try on a gray line).
The style definitions in the file "styles.xml" of your spreadsheet look like this:
<style:style style:name="Untitled1" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties style:diagonal-bl-tr="none" style:diagonal-tl-br="none" fo:background-color="transparent"/>
<style:text-properties fo:color="#ff0000" fo:font-weight="bold"/>
</style:style>
<style:style style:name="GREEN" style:family="table-cell" style:parent-style-name="Default">
<style:table-cell-properties fo:background-color="transparent"/>
<style:text-properties fo:color="#00a933" fo:font-weight="bold"/>
</style:style>
<style:style style:name="YELLOW" style:family="table-cell" style:parent-style-name="Default">
<style:text-properties fo:color="#ffff00" fo:font-weight="bold"/>
</style:style>
Seems like the setting fo:background-color="transparent"
is causing the problem. This is also visible on the user interface:

If you remove this setting from the style then it will no longer override the background of the cell.
To remove (English interface language, if your system is different (German) you can find corresponding action, or set the system interface language temporarily to English in Tools/Options/Language Settings/Languages/User interface):
- select View/Styles (or press F11)
- on the styles pane select the style "Untitled1"
- right click, select "Modify"
- (select the "Organizer" tab, confirm you see "Automatic, Transparent" on the "Contains" area)
- select the "Background" tab
- click "Standard" button
- (select the "Organizer" tab, confirm the "Automatic, Transparent" setting is no longer shown
- click "OK"
- repeat for style "GREEN"
Bottom line:
- checking style contents on the "Organizer" helps in a lot of cases
- setting the background explicitly to "None" (probably that is what you did) actually makes things worse in this case. The behavior of that setting is questionable, though: (1) the setting does not visually appear on the "Background" tab, only shown on "Organizer" (2) if "None" is selected, why does it apply a white background if the style is used? Especially since the
styles.xml
contains a setting of fo:background-color="transparent"
, i.e. "transparent" is not normally expected to mean "white" - this could be a bug report actually because of the problems mentioned above
How did you define the conditional formatting? I cannot reproduce this behavior. On my system the background stays gray.
To track this behavior, you should also specify your operating system and LibreOffice version.
Edit your question or write a comment. Thank you.
It is also helpful to have a reduced document in which the behavior can be reproduced.
To upload, please also edit your question and use the paperclip icon.
Don't write an answer, these are reserved for solutions.
Uploaded an example file & added my OS/LibreOffice Version
@Opaque, Your answer is correct on the sample file. Please undelete it.
Don't know why there are differences in my results on a new file with cells with manually gray background and with AutoFormatStyles.
C:\fakepath\red-green-yellow.ods, made with LibreOffice 6.4.7.2.