text

cedwards

·

transparent colors

·

Plain Text

·

Total Size: 492 B

·

·

Created: 1 year ago

·

Edited: 1 year ago

t_col <- function(color, alpha = 1, name = NULL) { # color = color name # alpha = fraction of opacity # name = an optional name for the color ## Get RGB values for named color rgb.val <- col2rgb(color) ## Make new color using input color as base and alpha set by transparency t.col <- rgb(rgb.val[1], rgb.val[2], rgb.val[3], max = 255, alpha = alpha*255, names = name) ## Save the color invisible(t.col) }

0 bits

288 views

Are you sure you want to delete?