Simplify color math in rgb conversion.