yihui/knitr — Issue #43: Allow user to specify colors by name
Author: ramnathv
Created: 2011-12-09 01:16:18+00:00
State: open

It would be useful to allow users to specify the background color by name, instead of having to enter `rgb` values. A simple internal function can handle the conversion.

```
col2knit <- function(color){
paste(round(col2rgb(color)/255, 2), collapse = ";")
}

col2knit('springgreen3')
[1] "0;0.8;0.4"

```