R/color-conversions.R
hexToCol.Rd
Convert hexadecimal colors to the nearest named R colors.
hexToCol(col, method = c("ciede2000", "cie76"))
character vector of hexadecimal colors.
color difference formula, "ciede2000" (default) or "cie76", see Details.
"ciede2000"
"cie76"
Character vector of named R colors.
color-conversion-overview
hexToCol(c("#A22A2A", "#4169E0")) #> [1] "brown" "royalblue" hexToCol("#4169E0", method = "cie76") #> [1] "royalblue"