The Eyedropper tool allows you to pick the current foreground or background color from an existing color in the image.
Activate the Eyedropper tool from the raster toolbar. To set the foreground color, left-click on a pixel in the image. To set the background color, right-click on a pixel.
The foreground and background colors may also be changed using the Color Tool.