added tests for bgcolor functionality

Initial commit, the tests pass and this would inject the correct information into the bgcolor attribute. However I don't feel the style fits the design of the codebase. All thoughts would be welcome.