Adapt thumnails text color to background

See #726067