convert_colour: Convert Colour

Description Usage Arguments Details Examples

View source: R/convert_colours.R

Description

Converts colours between RRGGBBAA and hex strings, in both directions.

Usage

1
2
3
4
5
6
7

Arguments

x

character vector of hex strings, or numeric matrix of RRGGBBAA values

Details

If a combination of hex strings with and without alpha values are supplied, those without are assumed to have an alpha value of FF and will be returned in the RRGGBBAA matrix

Examples

1
2
3
4
5
convert_colour(c("#FFAA00"))
convert_colour(c("#FFAA00","#FF00AAFF"))

convert_colour(matrix(c(255,170,0),ncol = 3))
convert_colour(matrix(c(255,170,0,255),ncol = 4))

colourvalues documentation built on Dec. 8, 2020, 1:06 a.m.