It works, but you need to handle the chain of events or you won't be able to choose a color, the context menu closes before you can click the apply button.
For future reference and if it helps anyone:
1) Handle the treeview's OnClientContextMenuShowing on context menu and save the clicked node in a global variable
2) Handle the treeview's OnClientContextMenuItemClicking and cancel the event if the click was on the colorpicker item (or it will close before applying the new color)
3) Handle the color picker's OnClientColorChange and do your work, the node will be saved in the global variable. When you are finished close the context menu.
4) Handle the context menu's OnClientHidden and set the global variable to null.
1 and 4 only need to be done if you need the node that called the context menu.