• If hex colour doesn't have an alpha channel, add it as 'FF'

  • If hex colour only has 3 digits, expand it to 6, then add alpha channel

parse_colour_hex(hex_colour)

Arguments

hex_colour

e.g. '#000'

Value

8 char hex colour

Examples

if (FALSE) { parse_colour_hex('#123') # -> '#112233FF' }