Context menu to change node color

I’m trying to modify the basic sample diagram to be able to change the node color using the context menu. However, I’m having trouble combining both examples online. The problem with the context menu sample is that I can’t add new nodes and when I combine it with the basic sample, instead of appearing the text inside the node, the key value appears (integer number).
Is there a right way of changing the context menu in the basic sample diagram?? I see there are different buttons and I wonder what is the way of creating one that enables to change the node color, just like the following ones:
makeButton(“Cut”,
function(e, obj) { e.diagram.commandHandler.cutSelection(); },
function(o) { return o.diagram.commandHandler.canCutSelection(); }),
makeButton(“Copy”,
function(e, obj) { e.diagram.commandHandler.copySelection(); },
function(o) { return o.diagram.commandHandler.canCopySelection(); }),

See the “Change Color” context menu button/command in the Dynamic Ports sample: Dynamic Ports