Skip to contents
colors <- tabulate_table()

colors %>% 
  table_add_row(
    c("Font Color is Red", "Font Color is Blue", "Font Color is Green")) %>% 
  table_add_row(
    c("Everything is Red", "Everything is Blue", "Everything is Green")) %>% 
  table_add_row(
    c("Font Background is Red", "Font Background is Blue", 
      "Font Background is Green"))

colors %>% format_width(16)

colors[1,1] %>% format_font_color("red") %>% format_font_style("bold")
colors[1,2] %>% format_font_color("blue") %>% format_font_style("bold")
colors[1,3] %>% format_font_color("green") %>% format_font_style("bold")

colors[2,1] %>% 
  format_border_left_color("red") %>% 
  format_border_left_background_color("red") %>% 
  format_font_background_color("red") %>% 
  format_font_color("red")

colors[2,2] %>% 
  format_border_left_color("blue") %>% 
  format_border_left_background_color("blue") %>% 
  format_font_background_color("blue") %>% 
  format_font_color("blue")

colors[2,3] %>% 
  format_border_left_color("green") %>% 
  format_border_left_background_color("green") %>% 
  format_font_background_color("green") %>% 
  format_font_color("green") %>% 
  format_border_right_color("green") %>% 
  format_border_right_background_color("green")

colors[3,1] %>% 
  format_font_background_color("red") %>% 
  format_font_style("bold")
colors[3,2] %>% 
  format_font_background_color("blue") %>% 
  format_font_style("bold")
colors[3,3] %>% 
  format_font_background_color("green") %>% 
  format_font_style("bold")
print(colors)
#> +----------------+----------------+----------------+
#> | Font Color is  | Font Color is  | Font Color is  |
#> | Red            | Blue           | Green          |
#> +----------------+----------------+----------------+
#> | Everything is  | Everything is  | Everything is  |
#> | Red            | Blue           | Green          |
#> +----------------+----------------+----------------+
#> | Font           | Font           | Font           |
#> | Background is  | Background is  | Background is  |
#> | Red            | Blue           | Green          |
#> +----------------+----------------+----------------+