plotly (version 2.0.2)

toRGB: Convert R colours to RGBA hexadecimal colour values

Description

Convert R colours to RGBA hexadecimal colour values

Usage

toRGB(x, alpha = 1)

Arguments

x
character for colour, for example: "white"
alpha
transparency alpha

Value

  • hexadecimal colour value (if is.na(x), return "transparent" for compatibility with Plotly)