Return a 6 hexidecimal digit color representations

as_hex6color(color)

Arguments

color

input color

Details

Compared with hex12tohex6(), it could accommodate 6 digit code, 12 digit code or real color names.

See also

Examples

color <- c("#FF00FF", "#999999999999", "red") # return 12 hexidecimal digit color loon:::l_hexcolor(color)
#> [1] "#FFFF0000FFFF" "#999999999999" "#FFFF00000000"
# return 6 hexidecimal digit color as_hex6color(color)
#> [1] "#FF00FF" "#999999" "#FF0000"
# return color names l_colorName(color)
#> [1] "magenta" "gray60" "red"
if (FALSE) # WRONG COLORS hex12tohex6(color)