revised color calculations.