I am on the lookout for a function that reduces the saturation of a given colour palette by a certain amount. E.g. imagine I have the palette

```
library(colorRamps)    
col.palette=colorRampPalette(rainbow(13),interpolate ="spline")(1000)
pie(rep(1,1000), col=col.palette,lty=0,labels=NA)

```

![enter image description here](https://i.stack.imgur.com/LmHVc.png)

Is there any function out there that could work on this `col.palette` colour vector, and reduce the saturation by a certain amount, or allow the brightness and contrast to be changed? (I am trying to achieve a rainbow palette with less saturation and smoother transitions than the standard one)

EDIT: also just discovered function `muted` in package `scales` that more or less does what I want :
<http://www.inside-r.org/packages/cran/scales/docs/muted> 

as well as `rainbow_hcl` in package `colorspace` mentioned by Josh O'Brien below, which was the kind of more muted and equal intensity rainbow I was looking for :
<http://www.inside-r.org/packages/cran/colorspace/docs/rainbow_hcl> :

```
library(colorspace)
pie(rep(1,1000), col=rainbow_hcl(1000,c=100,l=60),lty=0,labels=NA)

```

![enter image description here](https://i.stack.imgur.com/9T8Sr.png)