I have a gt table in R and want to color all of the values in the same color. For example, using the mtcars dataset, how could I color all values of 0 in red and all values of 4 in blue?
library("gt")
mtcars %>%
gt()
I tried to use tab_style()
and data_color()
with no success so far. To be clear, I want an easy solution that will work with tables that have dozens of columns, without having to add myriads of additional tab_style()
and data_color()
or other additional arguments, if that's possible.