Added color conversion helper function and formatted code