Extract the main colour of an image's borders