Table view interface question

I try to setup a little app which should process video subtitle files.
Converting the textual information to HTML and from there to attributed string works.

The nature of these cue text things is that the text is displayed against a black (or grey) background. Text color default is white, but yellow, cyan sometimes purple are used as well depending on the type of cues.

So the background of the table view is black, some text cells might have a dark color other than black.

As long as no row is selected everything is fine. Once a row is selected it will get blue ( or the settings of the system). That’s something people might be able to live with.
But when the table view is “out of focus” the row turns into “light grey” and everything is not readable anymore.
Same with text selection.

Is there a possibility to achieve something like the below

Or something like that