haozhu233 / kableExtra

Construct Complex Table with knitr::kable() + pipe.

Home Page:https://haozhu233.github.io/kableExtra/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default gray percentage too low

raffaem opened this issue · comments

I was experimenting with the striped option like in the vignette:

kbl(dt, booktabs = T, linesep="") %>%	kable_styling(latex_options = "striped")

This is the generated LaTeX code:

\cellcolor{gray!6}{Mazda RX4} & \cellcolor{gray!6}{21.0} & \cellcolor{gray!6}{6} &

but the default gray percentage of 6% is barely visible.

I thought the option didn't work until I figured it out and incremented the percentage manually.

  1. How can I change this percentage?
  2. Shouldn't we have a higher default value?

Hi @raffaem,

You are already using the kable_styling() function. Inside this function try something like stripe_color = "gray!15".

HTH,
Rainer