files/en-us/web/api/eyedropper/open/index.md
{{securecontext_header}}{{APIRef("EyeDropper API")}}{{SeeCompatTable}}
The EyeDropper.open() method starts the eyedropper mode, returning a promise which is fulfilled once the user has selected a color and exited the eyedropper mode.
open()
open(options)
options {{optional_inline}}
signal {{optional_inline}}
AbortSignal's {{domxref("AbortController/abort()", "abort()")}} method is called.A {{jsxref("Promise")}} that eventually resolves when the user selects a pixel color from the screen.
The promise resolves to an object with the following property:
sRGBHex
#aabbcc).Exceptions are not thrown but returned when the {{jsxref("Promise")}} is rejected.
NotAllowedError {{domxref("DOMException")}}
open() is not called via a transient user activation.InvalidStateError {{domxref("DOMException")}}
AbortError {{domxref("DOMException")}}
open().OperationError {{domxref("DOMException")}}
{{Specifications}}
{{Compat}}