add_alphas: replace alpha values of an RGB string color vector

View source: R/clusterTools.R

add_alphasR Documentation

replace alpha values of an RGB string color vector

Description

adds (or replaces existing) alpha values (from 0 to 1) to RGB string colors; extended to vectors from http://www.magesblog.com/2013/04/how-to-change-alpha-value-of-colours-in.html

Usage

add_alphas(col, alpha = rep(1, length(col)))

Arguments

col

a string vector of RGB color specifiers with ("#FF0000AA ") or without ("#FF0000") existing alpha values

alpha

a numeric vector of equal length as argument col providing new alpha values from 0 to 1


raim/segmenTools documentation built on April 25, 2024, 10:14 a.m.