powered by
Function to convert rgb color to hex color
rgb2hex(r = 0, g = 0, b = 0)
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))
Run the code above in your browser using DataLab