use the “Custom Preview” component inside “Display” tab then add a “color swatch” along with your input geometry. Then you can bake the “Custom Preview” Component with said color. You can also use Human to make a “Custom Preview Material”
My experience is that you can always bake gradients/swatches. If you post your script we could be more helpful.
Good luck!
Also, make sure your view mode in rhino is the appropriate one. You will most likely see the baked material in rendered mode or your own custom mode with rendered materials. If you are on shaded or ghosted etc you’ll be seeing the layer color -not the Material color the curves were baked with. Just use Custom Preview.