rgb_to_hex: Convert RGB Value to Hexadecimal

View source: R/colors.R

rgb_to_hexR Documentation

Convert RGB Value to Hexadecimal

Description

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

Usage

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

# Hexadecimal with pound sign
rgb_to_hex(255,255,255)

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

coatless/balamuta documentation built on Nov. 16, 2023, 5:30 a.m.