This function calls first col2rgb
on a color name and then
uses rgb
to adjust the intensity of the result.
dimColor(col, density = 55)
A character vector with the color code. See rgb
for details.
rgb col2rgb
dimColor(2,33)
#> [1] "#DF536B21"
dimColor("green",133)
#> [1] "#00FF0085"