add HTML color support to background color
diff --git a/R/column_spec.R b/R/column_spec.R
index 755c57d..eede10b 100644
--- a/R/column_spec.R
+++ b/R/column_spec.R
@@ -183,7 +183,7 @@
   }
 
   if (!is.null(background)) {
-    background <- sprintf("\\\\columncolor{%s}", background)
+    background <- paste0("\\\\columncolor", latex_color(background))
   }
 
   latex_array_options <- c("\\\\bfseries", "\\\\em", "\\\\ttfamily")[
diff --git a/R/row_spec.R b/R/row_spec.R
index faa2465..6ab31ec 100644
--- a/R/row_spec.R
+++ b/R/row_spec.R
@@ -208,7 +208,7 @@
   new_row <- paste(unlist(new_row), collapse = " & ")
 
   if (!is.null(background)) {
-    new_row <- paste0("\\\\rowcolor{", background, "}  ", new_row)
+    new_row <- paste0("\\\\rowcolor", latex_color(background), "  ", new_row)
   }
 
   return(new_row)