For graphs G and H, let G?rbH denote the property that, for every proper edge-colouring of G, there is a rainbow H in G. graph threshold function pHrb=pHrb(n) this random G(n,p) satisfies pHrb=O(n?1/m(2)(H)), where m(2)(H) denotes so-called maximum 2-density H. Completing result Nenadov, Person, Škori?, Steger [J. Combin. Theory Ser. B 124 (2017), 1–38], we prove matching lower bound pKkrb k?5....