A straightforward access to photochromic diarylethene derivatives via palladium-catalysed direct heteroarylation of 1,2-dichloroperfluorocyclopentene.