Fast switching immobilized photochromic dyes