R/col2hex.R

Defines functions col2hex

Documented in col2hex

col2hex<-function(col){
	rgb<-col2rgb(col)[,1]
	hex<-c(0:9,LETTERS[1:6])
	paste("#",paste(hex[rgb%/%16+1],hex[rgb%%16+1],sep="",collapse=""),sep="")
}

Try the siggenes package in your browser

Any scripts or data that you put into this service are public.

siggenes documentation built on Nov. 8, 2020, 6:26 p.m.