rgb2hex: Convert RGB to hex

Description Usage Arguments Examples

View source: R/rgb2hex.r

Description

Enter a list of RGB color codes, or R colors, and get the appropriate hex color code.

Usage

1
rgb2hex(rgbcode = NULL, rcolor = NULL)

Arguments

rgbcode

List of rgb color codes, each list must be a vector of three objects representing the three components of rgb color code from 0 - 255. This can be a named list where the name represents the name of the color to be used.

rcolor

An unnamed list of R color names.

Examples

1
2
3
4
rgb2hex(rcolor = list("sienna2", "thistle1"))
rgb2hex(rcolor = list("sienna2", "thistle1"), rgbcode = list('orange' = c(238, 74, 24), 
'raw umber' = c(113, 75, 35)))
rgb2hex(rgbcode = list('orange' = c(238, 74, 24), 'raw umber' = c(113, 75, 35)))

lebebr01/highlightHTML documentation built on May 31, 2021, 8:30 p.m.