col2hex: Colour to hex conversion.

View source: R/palr.R

col2hexR Documentation

Colour to hex conversion.

Description

Create colours from colour names in one easy step.

Usage

col2hex(x, alpha = 1)

Arguments

x

vector of colour names or hex strings

alpha

optional transparency value in [0,1], can be per colour in x

Value

character string of hex colours

Examples

col2hex(c("aliceblue", "firebrick"), alpha = c(1, .5))
col2hex(c("#FFFFFF", "#123456FF"), alpha = 0.1)

palr documentation built on Nov. 6, 2023, 9:06 a.m.