Localization transition for a randomly colouredself-avoiding walk