PBSmodelling (version 2.68.8)

lucent: Convert Solid Colours to Translucence

Description

Convert a vector of solid colours to a vector of translucent ones (or vice versa)

Usage

lucent(col.pal=1, a=1)

Value

Vector of transformed colours depending on the alpha transparancy value a.

Arguments

col.pal

vector of colours

a

alpha transparency value (0 = fully transparent, 1 = opaque)

Author

Steve Martell, International Pacific Halibut Commission, Seattle WA

Details

The function acts as a small wrapper to the rgb function.

See Also

pickCol, testCol, col2rgb, rgb

Examples

Run this code
local(envir=.PBSmodEnv,expr={
  oldpar = par(no.readonly=TRUE)
  pbsfun = function(clrs=c("moccasin",rainbow(3))){
    clrs = c(clrs,lucent(clrs,a=0.25))
    testCol(clrs); invisible() }
  pbsfun()
  par(oldpar)
})

Run the code above in your browser using DataCamp Workspace