Converts RGB values to hex colour code
Arguments
- x
Red, green and blue values between 0 and 255: either a vector of length 3 (e.g.
c(15, 75, 99)) or the matrix returned byrgba_to_rgb().
Examples
temp_rgb_matrix <- rgba_to_rgb(c(52, 46, 39, 0.8))
rgb_to_hex(temp_rgb_matrix)
#> [1] "#5C5752"
rgb_to_hex(c(15, 75, 99))
#> [1] "#0F4B63"
