slight refactoring in color class. New errors in the code will be fixed soon.