I got your code working, it shows the full native color dialogue, but only if I set to allow popups.
I catch the clicked menu:
browser.runtime.onMessage.addListener(function(commandString, sendResponse) {
CommandParse(commandString);
});
then I send it to my CommandParse function:
async function CommandParse(argString) {
.......
if (argString.includes("fontcol")) { // Invoke font color wheel
argString = await getColor(argString);
}
Which calls getColor, which invokes your functions, but somewhere or other the user click is being lost:
async function getColor(mkColor) {
let fontColor = await pickColor();
mkColor = mkColor.replace(/{{fontcol}}/g, fontColor);
return mkColor;
}
Obviously, I did not encounter this in my other menu items because I did not need a popup window to invoke those functions.
The menu is invoked by a user action, clicking on the menu, but that gets lost somewhere in the handoff.