I've read they use jellyfish DNA to make the colors. I believe this is why they heal the same colors they've been changed to. Definitely has changed from the days when they used to tattoo the fish.
I though this was genetic as well but after seeing all the comments about dye I'm second guessing. Honestly if it is genetic I would feel no shame in owning one as it would then clearly be captive bred