Chemical modulation of optical properties of polydiacetylenes for photonic application