Return a 6 hexidecimal digit color representations
as_hex6color(color)
color | input color |
---|
Compared with hex12tohex6()
, it could accommodate 6 digit code, 12 digit code or
real color names.
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"#> [1] "magenta" "gray60" "red"