# Latex background and text color

**URL:** <https://forums.ankiweb.net/t/latex-background-and-text-color/477>\
**Category:** Card Design\
**Created:** [June 25, 2020, 11:23am UTC](https://forums.ankiweb.net/t/latex-background-and-text-color/477 "2020-06-25T11:23:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mateus2k2](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@mateus2k2](https://forums.ankiweb.net/u/mateus2k2)\
**Post date:** [June 25, 2020, 11:23am UTC](https://forums.ankiweb.net/t/latex-background-and-text-color/477/1 "2020-06-25T11:23:14Z")

</div>

So I tried different thing like but nothing works. It looks like for some reason the code I put on the header opting of the card type doesn’t work, like [this](https://www.reddit.com/r/Anki/comments/er0pp2/latex_formatting_advice_background_and_text_color/). It just keeps the images with a black background.

Do I have to configure something else on the MiKTeX Console or do something else on anki? It would be nice if someone could send me the HTTP the CSS and the code to put on the header

[Example image](https://preview.redd.it/eqjvrfcj3y651.png?width=1363&format=png&auto=webp&s=c732a834fec8407b0bc42bc2db0d9fa187f2c7cb)

Edit: When I added this code to the style of the card the background got white

`.nightMode .latex { filter: invert(0%); background-color:transparent; }`

---

<div class="post-metadata">

**Author:** ![addons\_zz](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/addons_zz/32/43_2.png) [@addons\_zz](https://forums.ankiweb.net/u/addons_zz)\
**Post date:** [June 25, 2020, 4:36pm UTC](https://forums.ankiweb.net/t/latex-background-and-text-color/477/2 "2020-06-25T16:36:02Z")

</div>

> [@mateus2k2](#):
>
> So I tried different thing like but nothing works.

What are those different things you tried?

> [@mateus2k2](#):
>
> .nightMode .latex { filter: invert(0%); background-color:transparent; }

Changing the CSS will not affect Latex images background unless latex creates images with transparent background.

> [@mateus2k2](#):
>
> I put on the header opting of the card type doesn’t work, like [this](https://www.reddit.com/r/Anki/comments/er0pp2/latex_formatting_advice_background_and_text_color/).

How your problem is different from that one? What did you try?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 7:44am UTC](https://forums.ankiweb.net/t/latex-background-and-text-color/477/3 "2023-05-01T07:44:50Z")

</div>


