Implemented error handling for color preferences.