Skip to content

Instantly share code, notes, and snippets.

@bkrmendy
Last active June 5, 2025 08:16
Show Gist options
  • Save bkrmendy/f4582173f50fab209ddfef1377ab31e3 to your computer and use it in GitHub Desktop.
Save bkrmendy/f4582173f50fab209ddfef1377ab31e3 to your computer and use it in GitHub Desktop.
eyedropper.d.ts
interface ColorSelectionOptions {
signal?: AbortSignal
}
interface ColorSelectionResult {
sRGBHex: string
}
interface EyeDropper {
open: (options?: ColorSelectionOptions) => Promise<ColorSelectionResult>
}
interface EyeDropperConstructor {
new (): EyeDropper
}
interface Window {
EyeDropper?: EyeDropperConstructor | undefined
}
@bkrmendy
Copy link
Author

Thanks! I've updated the gist to reflect your changes. Hopefully we'll get official support for this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment