Pass a named colorspace hcl palette to circlize::colorRamp2.
If you do not specify a range this function returns a function and the heatmap color palette will use the range of the data automatically
If you do specify a range, this returns a colour palette with that range
heat_palette(
palette = ifelse(sym, "Blue-Red 3", "Rocket"),
breaks = "auto",
range = NA,
sym = FALSE,
rev = FALSE
)
named palette from colorspace::hcl_palettes() diverging/sequential or a vector of colour names/hexcodes
number of breaks, "auto" is 11 for a named palette, or uses palette length
NA to return palette generating function that takes range or numeric vector indicating the range, to return a palette
makes palette range symmetrical around 0 if TRUE
reverse the palette?
circlize::colorRamp2 palette if range = NA, or function returning a palette when given a range