Colors in Libreoffice Math

I’m writing a presentation in Impress, and I had selected a dark background.

The actual problem here is, I need to include a couple formulas which I would have wanted to write out using the builtin formula object which is, in practice, the same as using LibreOffice Math. But unfortunately, I can’t find any setting that allows me to change the formula text’s color to white (or any other visible color).

I’ve tried changing the style in Impress, but apparently the formula text doesn’t count as text and isn’t in any way touched by any changes to the style. The only (very bad-looking) solution seems to be changing the background of the formula itself to white.
I’ve also tried looking in Math’s options, but you can change size, differentiate the fonts between variables, functions etc., but apparently not change colors.
I’ve looked up around this site, but I’ve been unable to find anything pointing to a solution.

Is there a way to do this or will I have to change the backgrounds?

tdf#148505

By default, font colour is Automatic in “usual” components (Writer, Calc, Impress). You can expect that if you choose a background (for page or slide), text colour will be automatically contrasted so that text is visible. It works within a component because it has all information (background colour and text colour set to Automatic) to adjust contrast.

When you insert a Math formula, you in fact import an “external” object into your component. A Math object will be seen as a “black box” and nothing will be adjusted because its formatting is totally different. The only thing other components can do is render the formula.

Since you can’t rely on automatic adjustment, you must patch your formula to cope with its finale environment. It is quite easy. Embed your present formula in a specific colour environment as:

 color white { your_present_formula }

The curly brackets delimit the range of the colour change.

That explains a lot, thanks