About "Composite Graphics / Visual Equipment"...

I recently found this script about Composite Graphics / Visual Equipment issues.
The truth is that it helps me a lot to make a creator for an avatar, but I found a problem that I need to explain:
I have this command that should be written in a comment (don't a scriptcall):
\cc["filename", i0, h0, o255, z0, r0]
With this I can call a png that has one of the character parts and its index.
But this can have its drawbacks in the long run.

For example: For the hair I had planned to make 8 hairstyles, with 8 types of color each, and all of that for both men and women (2 genders)
And since a comment does not have the flexibility of a script, I would have to do that command about 128 times, just for the hair.

That is why I am asking for help with recommendations that will help me solve or speed up that problem.
In the worst case I would have to either program all of that, or reduce the number of color or hairstyle options and reduce the work.

Original thread: https://forums.rpgmakerweb.com/threads/about-composite-graphics-visual-equipment.172301/