Add spec_color and family
diff --git a/tests/visual_tests/cell_spec_html.Rmd b/tests/visual_tests/cell_spec_html.Rmd
new file mode 100644
index 0000000..4e90de3
--- /dev/null
+++ b/tests/visual_tests/cell_spec_html.Rmd
@@ -0,0 +1,24 @@
+---
+title: "cell_formatter_pdf"
+author: "Hao"
+date: "10/11/2017"
+output: html_document
+---
+
+```{r, include=F}
+library(knitr)
+library(kableExtra)
+library(dplyr)
+```
+
+```{r}
+mtcars[1:15, 1:5] %>%
+ mutate(
+ mpg = cell_spec(mpg, "html", color = "white", background = spec_color(mpg)),
+ disp = cell_spec(disp, "html", color = spec_color(disp, option = "B"),
+ bold = T, font_size = spec_font_size(disp)),
+ hp = cell_spec(hp, "html", hover_message = paste0("cyl:\n", cyl))
+ ) %>%
+ kable("html", escape = F) %>%
+ kable_styling("condensed", full_width = F)
+```
diff --git a/tests/visual_tests/cell_spec_pdf.Rmd b/tests/visual_tests/cell_spec_pdf.Rmd
index 728a355..3134ef9 100644
--- a/tests/visual_tests/cell_spec_pdf.Rmd
+++ b/tests/visual_tests/cell_spec_pdf.Rmd
@@ -12,13 +12,13 @@
```
```{r}
-mtcars[1:5, 1:5] %>%
+mtcars[1:25, 1:5] %>%
mutate(
mpg = ifelse(mpg > 21,
cell_spec(mpg, "latex", color = "green", bold = T),
cell_spec(mpg, "latex", color = "red", italic = T)),
- rotate = c(60, 120, 180, 240, 300),
- rotate = cell_spec(rotate, "latex", angle = rotate)
+ disp = cell_spec(disp, "latex", background = spec_color(disp),
+ color = "white", bold = T)
) %>%
kable("latex", escape = F, booktabs = T) %>%
row_spec(0, angle = 90)