Light and dark colours

darken(color, factor = 1.4)

lighten(color, factor = 1.4)

Arguments

color
Colour name.
factor
Lightening/darkening factory.

Value

A new rgb colour

Details

From https://gist.github.com/Jfortin1/72ef064469d1703c6b30.

Examples

darkFirebrick <- darken("firebrick") lightFirebrick <- lighten("firebrick") plot(c(1.5, 2, 2.5), c(1, 1.25, 1), pch = 19, cex = 150, col = c(darkFirebrick, "firebrick", lightFirebrick))