EyeDropperService

Provides access to the EyeDropper API for picking colors from anywhere on the screen. Opens a system color picker that returns the selected color in sRGB hex format.

TypeScriptexample.ts
import { EyeDropperService } from '@angular-helpers/browser-web-apis'

# Methods

MethodSignatureReturnsDescription
isSupportedisSupported(): booleanbooleanOverride to also assert secure context (required by the spec).
openopen(options?: { signal?: AbortSignal }): Promise<EyeDropperResult>Promise<EyeDropperResult>Opens the system eye dropper tool and returns the selected color.
LCP N/A
CLS N/A
INP N/A