modified rgb input of bg color and cleanup