How to Select and Erase by Color in Photoshop CS6
The Magic Eraser tool in Photoshop CS6 works like a combination Eraser and Magic Wand tool. It both selects and erases similarly colored pixels in an image:
When you click a layer: The Magic Eraser tool erases pixels of a similar color based on a specified range and leaves the area transparent.
When you click the background: The Magic Eraser tool automatically converts the background to a layer and then does the same thing.
When you click a layer with locked transparency: The Magic Eraser tool erases the pixels and replaces the area with the background color.
The Tolerance value defines the range of colors that Photoshop erases, just like it does with the Magic Wand tool. The value determines how similar a neighboring color has to be to the color that you click. A higher value picks up more colors, whereas a lower value picks up fewer colors.
In the example, the Tolerance value was 8 and based on the upper-left of the image. Photoshop selected and erased only a limited shade of black due to the lower Tolerance setting.
Here are the other options:
Anti-Alias: Creates a slightly soft edge around the transparent area.
Contiguous: Selects only similar colors that are adjacent to each other. Deselect this option to delete similar-colored pixels wherever they appear in your image.
Sample All Layers: Samples colors using data from all visible layers, but erases pixels on the active layer only.
Opacity: Works like it does for the regular Eraser tool.