Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RGB

A simple extension of rgb().


Description

A simple extension of rgb().

Usage

RGB(r, g, b, alpha)

Arguments

r, g, b

Red, Green, Blue: 0~255.

alpha

Color transparency (opacity): 0~1. If not specified, an opaque color will be generated.

Value

"#rrggbb" or "#rrggbbaa".

Examples

RGB(255, 0, 0)  # red: "#FF0000"
RGB(255, 0, 0, 0.8)  # red with 80\% opacity: "#FF0000CC"

bruceR

Broadly Useful Convenient and Efficient R Functions

v0.6.2
GPL-3
Authors
Han-Wu-Shuang Bao [aut, cre]
Initial release
2021-04-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.