Why invert the colors?

Because I cannot make assumptions about what colors are in the visualization.
So if I were to just change the background (which I can), then all black elements will become invisible.

Because lines are black?

Lines are one example.

Peter