Learn R Programming

MESS (version 0.5.12)

col.shade: Shade an RGB color

Description

Shades an RBG color

Usage

col.shade(col, shade = 0.5)

Arguments

col

a vector of RGB color(s)

shade

numeric value between 0 and 1. Zero means no change and 1 results in black

Author

Claus Ekstrom claus@rprimer.dk

Details

This function shades an RGB color and returns the shaded RGB color (with alpha channel added)

References

Ekstrom, CT (2011) The R Primer.

Examples

Run this code

newcol <- col.shade("blue")

Run the code above in your browser using DataLab