#' HEX from RGB.
#'
#' Converts a data frame with RGB colors to a vector of HEX collors.
#'
#'
#' @export
#' @param df A data frame with RGB color in the form created with rgb_tibble.
#' @return A vector of HEX colors.
farv_rgb_hex <- function(df){
cols <- c(1, 2, 3)
out <- purrr::modify(df, as.hexmode) %>%
tidyr::unite(cols, col="hex", sep="") %>%
purrr::map_df(~paste0("#", .x)) %>%
dplyr::pull()
out
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.