add.alpha function

Add transparency to any color

Add transparency to any color

add.alpha(col, alpha = 0.5)

Arguments

  • col: Color value or vector of colors
  • alpha: Opacity value to apply to the color(s)

Returns

A character vector containing color hex codes.

Examples

add.alpha("red",0.8)
  • Maintainer: Darius Nau
  • License: GPL (>= 3)
  • Last published: 2025-03-23

Useful links