The Eyedropper tool samples color to designate a new foreground or background color. You can sample from the active image or from anywhere else on the screen.
To select a new foreground color, click in the image. Alternatively, position the pointer over the image, press the mouse button, and drag anywhere on the screen. The foreground color selection box changes dynamically as you drag. Release the mouse button to pick the new color.
To select a new background color, Alt-click (Windows) or Option-click (Mac OS) in the image. Alternatively, position the pointer over the image, press Alt (Windows) or Options (Mac OS), press the mouse button, and drag anywhere on the screen. The background color selection box changes dynamically as you drag. Release the mouse button to pick the new color.