1. A method of operating an electronic device, comprising: displaying, by a display unit of the electronic device, an image as a preview; differentiating, by a control unit of the electronic device, a reference object and a target object in the image; determining, by the control unit, a reference color of the reference object and a background color of the target object; adjusting, by the control unit, the background color of the target object so as to correspond to the reference color of the reference object; and setting, by the control unit, the background color of the target object.