added the color palette function

@mathaywarduk and @tomdavies need to ok this.