improved performance of drawn colors routine