The tab_footnote() function

Use sza to create a gt table. Color the sza column using the data_color() function, then, use tab_footnote() to add a footnote to the sza column label (explaining what the color scale signifies).

sza |>
  dplyr::filter(
    latitude == 20 &
      month == "jan" &
      !is.na(sza)
  ) |>
  dplyr::select(-latitude, -month) |>
  gt() |>
  data_color(
    columns = sza,
    palette = c("white", "yellow", "navyblue"),
    domain = c(0, 90)
  ) |>
  tab_footnote(
    footnote = "Color indicates height of sun.",
    locations = cells_column_labels(
      columns = sza
    )
  )
tst sza1
0700 84.9
0730 78.7
0800 72.7
0830 66.1
0900 61.5
0930 56.5
1000 52.1
1030 48.3
1100 45.5
1130 43.6
1200 43.0
1 Color indicates height of sun.