Example diagram:
Open the file, copy the layer, and select the background with the magic wand tool.
2. Menu bar, select/deselect (ctrl+shift+i).
3. Menu bar, select/modify/reduce (1 pixel).
4. Copy the selection to the layer, (ctrl+j), and hide the layer under the main body for viewing.
5. Fill a color, move it under the main layer and check the final effect.
The method of unclear outline of black background object
Example diagram:
Insert the material into the background file and change the material layer blending mode to color filter.