These demos showcase the JavaScript EyeDropper API. The EyeDropper API enables app authors to use a browser-supplied eyedropper in the construction of custom color pickers.
The EyeDropper API provides access to a browser-supplied eyedropper, to enable app developers to implement an eyedropper, a tool that allows users to select a color from the pixels on their screen, including the pixels rendered outside of the web page that’s requesting the color data.
The EyeDropper API is implemented in Chromium browsers, such as Microsoft Edge 95 or later.
Sampling colors from your screen is a useful feature in creative applications. For example:
Without the EyeDropper API, web applications can’t do this. Some browsers do support it, if you use an <input type=color>
element, but that means you have to use the input element for something that you might want to do in JavaScript only and customize to your needs. The EyeDropper API fills that gap.