Fixed css styles for foreground and background

Module generated always an empty css style 'color:#' and 'background-color:#', generation of opacity was wrong.