as_hex6color: Return a 6 hexidecimal digit color representations

View source: R/l_ColorList.R

as_hex6colorR Documentation

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

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)

## Not run: # WRONG COLORS
hex12tohex6(color)
## End(Not run)

loon documentation built on July 9, 2023, 5:48 p.m.