RGB: A simple extension of 'rgb()'.

Description Usage Arguments Value Examples

View source: R/bruceR_basic.R

Description

A simple extension of rgb().

Usage

1
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

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

bruceR documentation built on June 22, 2021, 1:06 a.m.