Added better handling of transparent colors