adding logic to reuse color button if it's an image