rgb_to_hex: Convert RGB Value to Hexadecimal

Description Usage Arguments Value Examples

View source: R/colors.R

Description

This function converts an RGB value to the hexadecimal numbering system.

Usage

1
rgb_to_hex(R, G, B, pound = TRUE)

Arguments

R

A int that is between 0 and 255 for the Red value.

G

A int that is between 0 and 255 for the Green value.

B

A int that is between 0 and 255 for the Blue value.

pound

A bool that indicates whether a pound sign should be prepended to the hexadecimal.

Value

A string containing the hexadecimal information.

Examples

1
2
3
4
5
# Hexadecimal with pound sign
rgb_to_hex(255,255,255)

# Heaxadecimal without pound sign
rgb_to_hex(255,255,255,FALSE)

jjb documentation built on Jan. 8, 2020, 5:07 p.m.