Here is how you can change the node color from a button inside the Edit Form. Use this Code demo as inspiration to implement similar functionality in your project.