Consider extending <input type=color> instead
HTML has <input type=color>, and Firefox/Chrome/Safari all support activating an eyedropper from the popup.
It would be possible to add a new attribute, say eyedropper, to input to make the color picker directly enter the eyedropper mode instead of showing a color picker popup. The showPicker() API could allow invoking the eyedropper programmatically. The change and cancel events can be used to know when a color was chosen or the user dismissed without choosing a color.
Is there any functionality of the EyeDropper API that would be missing from extending the input element?
Duplicating the functionality with a separate API doesn't seem great since new functionality (e.g. wide gamut colors) would need to be added to both input color picker and the EyeDropper API.
This was raised in https://github.com/whatwg/html/issues/5584 but no rationale given to why it was closed, other than this API being pursued instead.
The explainer says https://github.com/WICG/eyedropper-api?tab=readme-ov-file#extending-inputtypecolor
This https://github.com/whatwg/html/issues/5584 proposes a new eyedropper attribute on the HTMLInputElement. This approach wasn't pursued primarily to avoid adding open and close methods to an already crowded HTMLInputElement API surface.
Having open and close methods allows the author more control over the duration of "eyedropper mode" and can enable repeated color selections by the user until they either ESC "eyedropper mode" or the author explicitly exits the mode, for example, in response to a click on a non-eyedropper tool.
Since showPicker() exists already, a new open() method is not needed. There is no "close picker" method currently, though.
Note that this might still be viable, and the constructor can continue to exist. It would just create an input element, similar to new Audio() or new Image().
This would be useful for design Apps or DevTools, such as Firefox's DevTools which has a eyedropper button.
I wrote some more context for this in https://github.com/mozilla/explainers/blob/main/eyedropper-input.md