Added color difference calculation