DescTools (version 0.99.15)

HexToRgb: Convert a Hexstring Color to a Matrix With Three Red/Green/Blue Rows

Description

Converts a hexstring color to matrix with 3 red/green/blue rows.

Usage

HexToRgb(hex)

Arguments

hex
a color or a vector of colors specified as hexadecimal string of the form "#rrggbb" or "#rrggbbaa"

Value

  • a matrix with 3 rows.

See Also

HexToCol

Examples

Run this code
HexToRgb(c("#ADD8E6", "#FA1572"))

Run the code above in your browser using DataCamp Workspace