mktransp: Make a color transparent

View source: R/all_custom_functions.R

mktranspR Documentation

Make a color transparent

Description

The function can be used to make a color value transparent with varying degrees of transparency. It can also be applied to vectors of colors.

Usage

mktransp(color, alpha = 100)

Arguments

color

Vector of colors to be turned transparent. Color values can be supplied in various forms.

alpha

Level of transparency on a 0-255 scale. 255 refers to no transparency.

Value

The output is the transparent color(s) in hexadecimal notation.

Examples

plot(1:4, pch=19, col=mktransp(c('blue', 'red')))

ryannick28/CustomFunctionsYrotha documentation built on June 1, 2025, 4:02 p.m.