Colorize numerical values

colorize(x, resolution = 4, pal = viridis::plasma)

Arguments

x

Values to normalize

resolution

Limit resolution for small values

pal

Color palette (?viridis)

Value

Colorized values

Examples

colorize(c(1,2,3))
#> [1] "#0D0887FF" "#CC4678FF" "#F0F921FF"