Auto Erase with the Pencil tool

Last updated on Oct 27, 2025

Learn how to automatically replace foreground and background colors in Adobe Photoshop using the Pencil tool’s Auto Erase feature.

Select the foreground or background colors from the toolbar.

Select the Pencil tool from the toolbar.

Select the Auto Erase checkbox in the Options bar.

Drag across the image:

If the cursor starts over the foreground color, Adobe Photoshop paints with the background color.

If it starts over another area, Photoshop paints with the foreground color.