useEyeDropper

Pick a color from anywhere on the screen with the EyeDropper API.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

It works in browsers that support the EyeDropper API.

APIs

useEyeDropper

const useEyeDropper = () => {
  supported: boolean
  open: (options?: {
    signal?: AbortSignal
  }) => Promise<{ sRGBHex: string } | undefined>
}
Edit this page on GitHub