Eyedropper tool in the Tools palette.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
Tool Options
In Tool Options you can see pixel RGB color value and you can set a sample size.