How to make a custom color palette, used to control the color of the material ball

You can make a custom color palette by setting up a color-picker UI element with, jscolor, a JavaScript Library for creating and displaying an assortment of colors:

JS Color - Examples

https://jscolor.com/examples/

PlayCanvas Demo