I’ve been having a problem getting the native color picker/color wheel for FF to launch from a context menu, because it runs into the popup blocker, which is a problem, since the interface is supposed to be entirely context menu based.
I have found a work-around.
More detailed code, at the Github for this project.
You can invoke a color picker by using the popup capabilities of a web-extension.
There are still some bits that I need to develop, but basically, my popup.html file is a table with the cells having different background colors:
When I click on the menu, (still working on the logic to limit it to certain menus only) a listener in the context menu invokes this:
browser.menus.onClicked.addListener(() => {
browser.browserAction.openPopup(); //need if statement here
});
And then I use a listener to determine which cell is clicked, and then get the color, and pass it to the program.
It’s not optimal, I would prefer to use the native color picker, but it is good enough.
See my Github for more details.