color_to_hex: Color to Hex

View source: R/color.R

color_to_hexR Documentation

Color to Hex

Description

Get the hex code for a color given by its name.

Usage

color_to_hex(x, alpha = FALSE)

Arguments

x

Color name as string.

alpha

logical value indicating whether the alpha channel (opacity) values should be returned.

Value

Vector of length 1 or greater of hex codes matched to the RGB derived from the color name.

See Also

col2rgb,rgb

Examples

color_to_hex("blue")

meerapatelmd/suzyBakeOven documentation built on March 30, 2022, 1:44 p.m.