LaTeX images changed to an odd color

I recently switched to the confit theme, and in the preview the images were great: black text with a white background. Once I applied the theme, however, they became red with a gray-background, and are entirely illegible.

How can I fix this problem? I have custom CSS available, if there is a CSS way to fix it.

I believe I have discovered where the problem is originating from. The background for the theme is automatically applied to the latex image *source* attribute. I.e., when I change the theme colors, the latex image link becomes, e.g.

What needs to happen (and I don't know where this should happen) is that the bg and fg parts need to be taken from the right places. Right now it appears fg comes from the link hover color... an awkward choice... and the bg from the background color. I want it to always be white bg and black fg.

From googling around, it appears this is a commonly voiced bug by fellow math bloggers. It would be nice if WordPress fixed it once and for all.

This is not a CSS issue even though it's (sort of) tied to CSS. I'm actually not sure whether it should be fixed in the LaTeX code or in the code that generates custom colors for each theme. I have posted it as an issue for the theme team to review the next time they are working on Confit, and someone will post back here with an update as soon as there is more information on the issue.

My css fix involved fixing the background and link hover colors to what I wanted for the LaTeX, and then manually adding in CSS to override the generated styles for the background colors of the remaining regions.

That is where I fixed it, but the url parameter thing should be considered a bug in how the theme constructs latex images from the theme colors. I can detail how I fixed it, but it's not the cleanest solution and I doubt it is stable across browsers.

Agreed. I think an update should be in LaTeX and not made via CSS. I made a note in the issue report, and now we'll need to wait for a reply back from them. Someone should reply here as soon as we have more info.

Even with the bugs (there is another bug about how LaTeX images are switched to display: block on the mobile theme)

Sounds like that should be reported separately. I went ahead and tested some equations using LaTeX on the mobile theme and was able to reproduce the problem. I used Safari's Develop > User Agent > iPhone option to take a screenshot of your post http://jeremykun.com/2013/07/05/reservoir-sampling/ to use as an example. For reference, here are the steps I reported: