Add a test for transparent backgrounds
Refactor the code that decides how to apply a bkgd color
Refactor background color code