PurposeThe purpose of this paper is to evaluate the photochromic performance of photochromic compounds in polymer matrices.Design/methodology/approachThe poly(methyl methacrylate) PMMA and epoxy resin doped with photochromic spirooxazine (SO) are prepared and the effects of ultraviolet (UV) irradiation are studied using spectrophotometer. The reversible reaction is effected using white light. Photochemical fatigue resistance of these films is also studied.FindingsIrradiation of colourless 7′,8′‐dichloro‐1,3,3‐trimethylspiro[indoline‐2,3′‐[3H]benzo[b][1,4]oxazine] (SO) doped in PMMA and epoxy resin with UV light (366 nm) results in the formation of an intense purple‐red coloured zwitterionic photomerocyanine (PMC). The reverse reaction is photochemically induced by irradiation with white light. Photocolouration and photobleaching reactions follow a first‐order rate equation. It is found that photocoloration rate constant of (SO) in both matrices is almost the same, which is unexpected. On the other hand, the rate of photobleaching reaction of (PMC) in PMMA is twice slower than that in the epoxy resin. It seems that the presence of the two chlorine atoms at positions 7′ and 8′ of the benzooxazine moiety destabilise the PMC in epoxy resin film and results in speeding up the fading process compared to that in PMMA. SO doped in epoxy resin shows much better fatigue resistance than that doped in PMMA.Research limitations/implicationsThe PMMA and epoxy resin polymers doped photochromic spirobenzooxazine described in this paper were prepared and studied. The principle of study established can be applied to any type of polymer or to any type of photochromic compounds.Practical implicationsThe photochromic materials developed can be used for different applications, such as coatings and holography.Originality/valueThe method developed may be used to enhance the performance of photochromic materials.