rgba: Get A String Containing 'rgba' Function

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Echarts uses rgba function heavily. You can convert color vectors into rgba function in string form to pass to an echarts object.

Usage

1
rgba(vecrgb, ...)

Arguments

vecrgb

A vector of RGB elements, or simply red int.

...

If vecrgb is simply red int, you can pass green, blue, alpha int here.

Value

A character string. E.g, 'rgba(125, 125, 125, 0.6)' or '#FFFFFF'

Examples

1
2
3
4
5
6
## Not run: 
rgba(c(123, 123, 124, 125))  # return 'rgba(123,123,124,0.490196078431373)'
rgba(123, 123, 124, 0.5) # return 'rgba(123,123,124,0.5)'
rgba(123, 123, 124)  # return '#7B7B7C'

## End(Not run)

madlogos/recharts2 documentation built on May 21, 2019, 11:03 a.m.