You can copy that entire block of code and then paste it into the Actions for each color block; all youll need to change is the
_root.hue=0x000000 line to reflect the hexadecimal value of the current color. Since we used the variable in the setRGB command, the change will automatically reflect without having to edit any other code.
Once youre done setting up the palette so that each color can change the selected fill box when clicked upon and its value is assigned to _root.hue as active, return to your artwork and right-click on one of the symbols for the fills that need to be painted in. Select Actions to open the Actions pane.