R/colors.R

Defines functions gg_color_hue

Documented in gg_color_hue

#' Default colors used by ggplot2
#'
#' @param n the number of colors to return
#'
#' @importFrom grDevices hcl
#' @return a vector of RGB colors in hex format
#' @export
gg_color_hue <- function(n) {
	hues = seq(15, 375, length = n + 1)
	hcl(h = hues, l = 65, c = 100)[1:n]
}
stackcon/rngt documentation built on June 17, 2022, 5:29 p.m.