Improved color definition code.