Learn R Programming

loon (version 1.4.1)

as_hex6color: Return a 6 hexidecimal digit color representations

Description

Return a 6 hexidecimal digit color representations

Usage

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

l_hexcolor, hex12tohex6, l_colorName

Examples

Run this code
color <- c("#FF00FF", "#999999999999", "red")
# return 12 hexidecimal digit color
loon:::l_hexcolor(color)
# return 6 hexidecimal digit color
as_hex6color(color)
# return color names
l_colorName(color)

if (FALSE) # WRONG COLORS
hex12tohex6(color)

Run the code above in your browser using DataLab