#####
#This function converts a color string from colors() to hexidecimal string
#####
#' @export
to.hex<-function(x){
cols<-col2rgb(x)
red<-cols[1]
green<-cols[2]
blue<-cols[3]
return(rgb(red, green, blue, maxColorValue = 255))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.