blend_colors | R Documentation |
given two color planes, generate a new color plane by blending the colors using the supplied alpha multiplier.
blend_colors(bottom, top, alpha) ## S4 method for signature 'ColorPlane,ColorPlane,numeric' blend_colors(bottom, top, alpha = 1) ## S4 method for signature 'ColorPlane,ColorPlane,missing' blend_colors(bottom, top) ## S4 method for signature 'HexColorPlane,RGBColorPlane,numeric' blend_colors(bottom, top, alpha) ## S4 method for signature 'HexColorPlane,ConstantColorPlane,numeric' blend_colors(bottom, top, alpha = 1)
bottom |
the bottom color plane |
top |
the top color plane |
alpha |
the alpha overlay value. |
The functions in this package blend colors based on the "over" operator where 'top' if foreground and 'bottom' is background.
a new ColorPlane
instance with 'top' and 'bottom' alpha-blended.
https://en.wikipedia.org/wiki/Alpha_compositing
top <- IntensityColorPlane(1:5, cols=rainbow(5)) bottom <- IntensityColorPlane(1:5, cols=rev(rainbow(5))) top <- map_colors(top) bottom <- map_colors(bottom) bc <- blend_colors(bottom, top, .5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.