Skip to contents

go from a colour like "red" to the hex code, "#FF0000"

Usage

col2hex(colour)

Arguments

colour

a colour name from colours() or colors()

Value

A hex color hex value

Examples

col2hex("red")
#> [1] "#FF0000"