R/col2hex.R

Defines functions col2hex

Documented in col2hex

#' col2hex
#'
#' convert a color to its hexadecimal code
#'
#' @export col2hex
#'
#' @param color - character
#'
#' @author Tyler W Bradshaw, \email{tyler.w.bradshaw@duke.edu}
#'
col2hex <- function(color, maxValue = 255) {
  ## NOTE: this function no longer works...??? 11/2/20

  z <- grDevices::col2rgb(color)

  hex <- rgb(z[1], z[2], z[3], maxColorValue = maxValue)

  return(hex)
}
twesleyb/SwipProteomics documentation built on Sept. 15, 2021, 7:38 a.m.