updated color calculations