Learn R Programming

loon (version 1.4.1)

l_colRemoveAlpha: Convert color representations having an alpha transparency level to 6 digit color representations

Description

Colors in the standard tk used by loon do not allow for alpha transparency. This function allows loon to use color palettes (e.g. l_setColorList) that produce colors with alpha transparency by simply using only the rgb.

Usage

l_colRemoveAlpha(col)

Arguments

col

a vector of colors (potentially) containing an alpha level

Examples

Run this code
x <- l_colRemoveAlpha(rainbow(6))
# Also works with ordinary color string representations
# since it just extracts the rgb values from the colors.
x <- l_colRemoveAlpha(c("red", "blue", "green", "orange"))
x

Run the code above in your browser using DataLab