I confirm if you want to use the code in the IconEditor you can.
Even it looks complicated to you. It tries to reproduce the ColorPalette of Windows.
I am waiting for the new Module feature in the next version of B4PPC, so this kind of code can be put into a module and reused by anyone with almost no need of adaptation.
Agraham's ColorDialog does the job and is much easier to implement than mine that needs to copy the form and the code.
I had tried to reproduce the Windows ColorDialog so the user feels familiar with it.