add gain for color to imporve precision.add isModified.