add palette param, closes #560