grayCol: Take a color and make it duller

View source: R/grayCol.r

grayColR Documentation

Take a color and make it duller

Description

Take a color and make it duller

Usage

grayCol(col, grayness, darkness = 0.25)

Arguments

col

Color

grayness

A value between 0 and 1; 0 does nothing, 1 is completely gray

darkness

A value between 0 and 1, indicating the darkness of the gray color to add (0 = white, 1 = black); default 0.25

Examples

grayCol('red', 0.5)
plot(1:10, pch=19, col='red')
points(2:10, pch=19, col=grayCol('red', 0.5))
points(3:10, pch=19, col=grayCol('red', 0.75))
points(4:10, pch=19, col=grayCol('red', 0.75, 0.1))
points(5:10, pch=19, col=grayCol('red', 0.75, 0.5))

grayCol(c('blue', 'red', 'green'), c(0.75, 0, 0.75), darkness=0.1)
plot(1:3, pch=19, col=.Last.value)


pbreheny/breheny documentation built on April 26, 2024, 10:40 a.m.