rgb2hex: RGB to Hex Color Conversion

Description Usage Arguments Value See Also Examples

Description

Convert matrices containing red, green, blue, and alpha (optional) values into hex color strings.

Usage

1
rgb2hex(col, maxColorValue = 255)

Arguments

col

An integer matrix with three ("red", "green", and "blue") or four ("alpha") rows and one column for each color in col. Values are in [0,M], where M is maxColorValue.

maxColorValue

number giving the maximum value for each of the color components in col (default: 255)

Value

The colors as hexadecimal strings

See Also

col2rgb for translating R colors to RGB vectors

Examples

1
2
# Get the hex color code for "orange"
rgb2hex(col2rgb("orange"))

briandconnelly/colormod documentation built on May 13, 2019, 5:13 a.m.