Learn R Programming

distrMod (version 2.9.4)

addAlphTrsp2col: "addAlphTrsp2col"

Description

Adds alpha transparency to a given color.

Usage

addAlphTrsp2col(col, alpha=255)

Value

a color in rgb coordinates

Arguments

col

any valid color

alpha

tranparancy; an integer value in [0,255]

Author

Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de

Examples

Run this code
## IGNORE_RDIFF_BEGIN
  addAlphTrsp2col(rgb(1,0.3,0.03), 25)
  ## gives "#FF4C0819" on 32bit and "#FF4D0819" on 64bit
## IGNORE_RDIFF_END
  addAlphTrsp2col("darkblue", 25)
  addAlphTrsp2col("#AAAAAAAA",25)
  palette(rainbow(6))
  addAlphTrsp2col(2, 25)

Run the code above in your browser using DataLab