The function shades or darkens an RGB value by adding black to the values.
Arguments
- rgb_value
A
vector
with length \(3 \times 1\).- shade_factor
A
double
that ranges between \([0, 1]\).
Examples
shade(c(22, 150, 230), shade_factor = 0.5)
#> [1] 11 75 115