A Sri Lankan landline is ten digits with its trunk 0, and the area code is the first three: 011 is Colombo, 081 Kandy, 091 Galle, 021 Jaffna. There are twenty-nine, each named for a town, and most are a district; seven districts hold two. This map draws every code on the divisional secretariat divisions it serves, coloured by the first digit after the 0.
How to read the map. Each patch is a code and the numeral on it is what you dial there; the town beneath is the one the regulator names the area for. The colour is the first digit after the 0: 1 is Colombo, 2 the north and the north-east from Jaffna round to Polonnaruwa, 3 the west and north-west, 4 the south, 5 the hill country and Uva, 6 the east, 8 Kandy and 9 Galle. Jaffna's 021 reaches down through Kilinochchi and Mullaitivu; Badulla's 055 takes in Monaragala.
Where the lines come from. The Telecommunications Regulatory Commission gives each code to an area named for a town, and Wikipedia's table says which district each area is in. Twenty-two districts hold one code and dial it whole, so their lines are district lines. Seven hold two — Colombo and Avissawella, Negombo and Gampaha, Panadura and Kalutara, Nawalapitiya and Kandy, Hatton and Nuwara Eliya, Ampara and Kalmunai, Badulla and Bandarawela — and nobody publishes where one ends and the other begins. Inside those seven, each divisional secretariat division is drawn in the code of the nearer of the two towns, which puts the line roughly where the operators do and exactly nowhere; it is an estimate, and the only one on the map.
Sources. Codes: Wikipedia, Telephone numbers in Sri Lanka — every area code with its town, district and province. Geometry: Survey Department of Sri Lanka, divisional secretariat boundaries, as the common operational dataset served by UNOSAT; dissolved by code, by region and by district.