How might I use a palette in a gt table (probably in data_color() so that negative correlations are colored more incrementally using the color-blind safe palette viridis?
Negative correlations are often in too similar of a color in this table, to my eyes.
require(corrr)
require(gt)
require(viridis)
mtcars %>%
corrr::correlate() %>%
slice(1:10) %>%
gt() %>%
data_color(
columns = where(is.numeric),
colors = scales::col_numeric(
## option D for Viridis - correlation coloring
palette = viridis(20, begin = 0, end = 1,
direction = 1, option ="D"),
domain = NULL)
)


Try direction = -1, option ="H"