Decode long integers into RGB values.
Arguments
- col
integer vector.
Examples
longToRgb(c(255, 65280, 16711680))
#> [,1] [,2] [,3]
#> red 255 0 0
#> green 0 255 0
#> blue 0 0 255
# there and back again
rgbToHex(longToRgb(rgbToLong(colToRgb("tomato"))))
#> [1] "#FF6347"