Start, poll or cancel the DevTools colour picker (eyedropper)
browser_eyedropperPicks a color from a webpage by arming Firefox's DevTools eyedropper, then reports the selected color after a click; cancel aborts.
Instructions
Drive the DevTools eyedropper / colour picker on a tab. MEASURED, and this is the whole trick: Firefox deliberately supports the eyedropper WITHOUT a toolbox (bug 1701004), so it is reachable through a standalone commands instance — CommandsFactory.forTab(tab), targetCommand.startListening(), target.getFront("inspector"), then inspectorFront.pickColorFromPage({copyOnSelect, fromMenu}). That call returns immediately and the colour arrives later as a "color-picked" event carrying color:Arg(0,"string") (see devtools/shared/specs/inspector.js); "color-pick-canceled" fires on escape. Because picking requires a real pointer press on the page, this tool starts the picker and then polls: action:"start" arms it, action:"result" reports the colour once the user has clicked, action:"cancel" aborts. The picker instance is cached on the chrome window so polling reaches the same session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | start = arm the picker, result = read the colour, cancel = abort | |
| context | No | Tab (default: the active tab) |