In this question, a user stated that he bypassed the issue of not having custom colours in math formulae by editing the LibreOffice source code.
Unfortunately, the user I mentioned didn’t explain how he did that. As you can see in the other post, I asked him, but since he has not been online again yet, he could not reply to my answer.
Can someone help me in this regard?