Script for color blind simulator

I am making a script for color blinds, which can convert background layer into specific color blind option. For now it just works for background layer only.