Move palette loader into common.