prodlim (version 2019.11.13)

dimColor: Dim a given color to a specified density

Description

This function calls first col2rgb on a color name and then uses rgb to adjust the intensity of the result.

Usage

dimColor(col, density = 55)

Value

A character vector with the color code. See rgb for details.

Arguments

col

Color name or number passed to col2rgb.

density

Integer value passed as alpha coefficient to rgb between 0 and 255

Author

Thomas A. Gerds <tag@biostat.ku.dk>

See Also

rgb col2rgb

Examples

Run this code
dimColor(2,33)
dimColor("green",133)

Run the code above in your browser using DataLab