Photochromism in microenvironments of various nature