col2hex: Converts color names with alpha to hex

View source: R/addons.R

col2hexR Documentation

Converts color names with alpha to hex

Description

The function takes the color names as specified in colors() together with alpha levels and transforms it to hex representation. Optionally it can also name the returned vector by names provided by the user.

Usage

col2hex(cols, alpha=1, names=NA)

Arguments

cols

character vector

alpha

numeric, ranged 0-1

names

character vector, default NA

Value

numeric vector

Author(s)

Małgorzata Oleś <malgorzata.oles@embl.de>

Examples

col2hex(cols=c("hotpink","skyblue"), alpha=0.5)
col2hex(cols=c("hotpink","skyblue"), alpha=0.5, names = c("A","B"))

MalgorzataOles/BloodCancerMultiOmics2017 documentation built on March 29, 2024, 2:29 p.m.