Design and fabrication of mechanochromic photonic crystals as strain sensor