There are many paid apps to color pick and sample color under your cursor. MacOS actually has a built-in app called: Digital Color Meter. You can find it in Spotlight, it’s installed under /Applications/Utilities.
You only need to know the following to start sampling color your cursor is hovering over:
- Select the output value type under:
View > Display Values. For web development purposes I usually set it to hexadecimal. - (optional) using
cmd + lyou can lock the current position. - Use
shift+cmd+cto copy the color to your clipboard.
Quick and easy!