If you’re wanting to know the colour of something on screen the Photoshop has a pretty good Color Picker. You can use it outside of the application if you click and hold and move to the object you want. That isn’t always the easiest thing to do however and can be a little frustrating at times. Thankfully Mac computers come with their own colour identifier, it’s called DigitalColor Meter.
There’s no bells and whistles in this application, but it does what you need.
First choose a colour space, and there’s a few to choose from, sadly this doesn’t include the hex number but Adobe RGB and LAB are among the choices.
Next choose the ‘aperture’. This is the size of the sample you’ll take. The colour reading will be the average of all the pixels under the sample point. The colour values are displayed as you move the mouse around the screen.
If you need to lock the position there’s a series of keyboard shortcuts to lock the X and Y coordinates Cmd+X and Cmd+Y and a complete lock, Cmd+L.
Once locked in place it’s still possible to alter the size of the aperture too.
There’s some more options for the magnify level and a couple of ways to save the colour data, but I’ve found these a little hit and miss.