Being a Web designer, you might be already dealing with Hex color codes for style sheets. Tools like Photoshop, can help you to get color codes for any pixel of image files and which are stored on your computer. When you need to know such information about colors displayed within a window, you can take a screenshot and then analyze that with an image editor.
There is also a simple and less headache method for such task. Actually this is not a method, but a free ware tool. Plastiliq PixelPicker is an application that provides complex information regarding the pixel you hover your mouse over.
It supports 10 Color formats which includes RGB, ARGB, HTML, CMYK, HSL, HSV/HSB, HEX, HEX with alpha, Decimal and Decimal with alpha. The tool has some other cool features like Clipboard utilization, stay-on-top, adjustable zoom, minimize to tray etc.
It supports 32/64-bit versions of Windows XP, Vista and 7. Download it from here.