palette2colors function

Extract colors from a palette