Returns lightened or darkened colors, vectorised over percentage.
ramp is valid for any couple of colors. Functions darken() and
lighten() call ramp to respectively darken and lighten a given color.
ramp(fromcol, tocol, percentage = 50, as_rgb = FALSE) darken(col, percentage = 50, as_rgb = FALSE) lighten(col, percentage = 50, as_rgb = FALSE)
| fromcol | starting color, i.e. if |
|---|---|
| tocol | color to nuance |
| percentage | percentage determining the percentage of |
| as_rgb | a logical. Should the color(s) returned as a matrix object? |
| col | the color to be darkened or lightened. |
ramp: Returns a shaded color.
darken: Darken a color.
lighten: Lighten a color.
#> [1] "#7F0000"