Sharing this in case anyone is interested.
This macro is used to change the Part-level colour based on a pre-defined color scheme.
The colour scheme i am using is based on the Light, Bright and Vibrant scheme from Paul Tol’s note.
https://personal.sron.nl/~pault/
GIF below:
ezgif.com-gif-maker (2).gif