Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

Arguments

col.pal

vector of colours

a

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

Details

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

Value

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

Author(s)

Steve Martell, International Pacific Halibut Commission, Seattle WA

See Also

Examples

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)
})

PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.