get_hex: Extract HEX code by RGB

Description Usage Arguments Author(s) Examples

View source: R/get_hex.R

Description

This function extracts HEX codes from RGB codes

Usage

1
get_hex(x, y)

Arguments

x

RGB codes in a character vector of length 1 (per color)

Author(s)

Jeppe Vierø

Examples

1
2
x <- c("14 17 22")
hex <- sapply(strsplit(x, " "), function(x) rgb(x[1], x[2], x[3], maxColorValue=255))

jvieroe/rtools documentation built on Jan. 10, 2022, 12:36 a.m.