Part of the Norwegian Kingdom of the Hebrides until the 13th century when it was ceded to Scotland , the isle came under the British crown in 1765 .