search for: rgbcodes

Displaying 1 result from an estimated 1 matches for "rgbcodes".

Did you mean: recodes
2009 Oct 13
2
General means of matching a color specification to an official R color name
...ately, I don?t know much about fuzzy matching. For example, following some examples I found in the archives and the wiki, I wrote this little function to create a table of official R colors and sort it if desired: colorSpecTable <- function(col = colors(), sort = NULL){ require(gplots) rgbcodes <- t(col2rgb(col)) names <- col hex <- col2hex(col) df <- data.frame(name = names, hex.code = hex, rgbcodes) # additional elements for other color spaces could be added if (!identical(sort, NULL)) df <- sort.data.frame(df, by = sort) } Note that sort.data.fram...