Learn R Programming

colorfast (version 1.0.1)

int_to_col: Fast conversion of colors-as-packed-RGBA-integers to hexadecimal

Description

Packed RGBA values are used in R's native raster objects.

Usage

int_to_col(icol)

Value

Character vector

Arguments

icol

Integer vector (where the 4 bytes making up each integer represent the RGBA values of the color)

Examples

Run this code
icols <- col_to_int(c("hotpink", "#abc", "#abcd", "#aabb99", "#aabb9980"))
int_to_col(icols)

Run the code above in your browser using DataLab