search for: hexvec

Displaying 4 results from an estimated 4 matches for "hexvec".

Did you mean: hervec
2000 Dec 15
1
Colour to RGB value?
There are a lot of ways to specify colours in R plot functions (number from the palette, by name, etc.). I'd like to pass a colour from an R function to an external function, and I'd like it to have the same flexibility. To avoid having to interpret all possible colour specifications myself, I need a function to convert a general colour specification into a standard form (e.g. r,g,b
2000 Feb 28
1
mapping of colornames into hsv?
I couldn't find this in online help or the archives: Is there any R function or object giving the mapping of the colornames as given by colors() into the hsv() model? Regards -- Dr. Jens Oehlschl?gel-Akiyoshi MD FACTORY GmbH Bayerstrasse 21 80335 M?nchen Tel.: 089 545 28-27 Fax.: 089 545 28-10 http://www.mdfactory.de
2000 Feb 28
1
mapping of colornames into hsv?
I couldn't find this in online help or the archives: Is there any R function or object giving the mapping of the colornames as given by colors() into the hsv() model? Regards -- Dr. Jens Oehlschl?gel-Akiyoshi MD FACTORY GmbH Bayerstrasse 21 80335 M?nchen Tel.: 089 545 28-27 Fax.: 089 545 28-10 http://www.mdfactory.de
2000 Feb 29
0
mapping of colornames into hsv: half way done
...ot; ) , ncol=2, byrow=T) and a quick retrieval function name2col <- function(name){ i <- match(name, .ColorDataBase[, 1]) .ColorDataBase[i, 2] } # Ben Bolker's function # not vectorized yet color.to.rgb <- function(color) { # given color as hexadecimal, return RGB values hexvec <- c(0:9,"A","B","C","D","E","F") rgb <- numeric(3) names(rgb) <- c("red","blue","green") for (i in (0:2)) { h1 <- which(hexvec==substr(color,i*2+2,i*2+2))-1 h2 <- which(hexvec==su...