Eyedropper Tool

Keyboard shortcut I
+ opt ⌥ =
The eyedropper tool samples color to designate a new foreground or background color.

Using Eyedropper to sample Foreground color:

Using Eyedropper to sample Background color:

HEX color value

To copy color as HEX color value click on the contextual menu Copy as HEX

Tool Options

In Tool Options you can see pixel RGB color value and you can set a sample size.