Learn R Programming

jjb (version 0.1.1)

shade: Shade an RGB value

Description

The function shades or darkens an RGB value by adding black to the values.

Usage

shade(rgb_value, shade_factor = 0.1)

Arguments

rgb_value

A vector with length \(3 \times 1\).

shade_factor

A double that ranges between \([0, 1]\).

Value

A matrix with dimensions \(3 \times 1\).

Examples

Run this code
# NOT RUN {
shade(c(22, 150, 230), shade_factor = 0.5)
# }

Run the code above in your browser using DataLab