rgb2hex | R Documentation |
Function to convert rgb color to hex color
rgb2hex(r = 0, g = 0, b = 0)
r , g , b |
colors, numeric scalar between 0 and 255 |
Nicholas Hamilton
#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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.