rgb2hex {ggtern}R Documentation

Convert RGB to HEX Color

Description

Function to convert rgb color to hex color

Usage

rgb2hex(r = 0, g = 0, b = 0)

Arguments

r, g, b

colors, numeric scalar between 0 and 255

Author(s)

Nicholas Hamilton

Examples

#Black
rgb2hex(0,0,0)

#White
rgb2hex(255,255,255)

#Red
rgb2hex(255,0,0)

#Green
rgb2hex(0,255,0) 

#Blue
rgb2hex(0,0,255)

#Vectorised sequence of blue
rgb2hex(0,0,seq(0,255,by=5))

[Package ggtern version 3.5.0 Index]