Rather than selecting a color from a color palette, you can choose specific colors from within your images. The Eyedropper tool enables you to pick a color from your image that can then be used when painting.
Click on the Eyedropper tool in the toolbox. The Eyedropper tool will become the active tool.
Click on the desired foreground color . The color you clicked on will become the active foreground color. You can use those colors to paint and draw in the current image file or another file.
Hold the Alt key and then click to select the desired background color.