Gutenberg – Dispatch action or setAttributes() on Post Save/Update action instead of onChange listener

You can still use the onChange listener and do setAttributes only when value passed in onChange is different from the one in attributes.customColors. This is one if and should not penalize performance much.

tech