Hi,
I also have to manage quite complex tables in term of layout, including color. After trying different package, I am now focusing with HuxTable.
https://hughjonesd.github.io/huxtable/
It is a nice one, you got the color and proper html and text output.
It might fit your needs for table in rmarkdown.
Regards,
jm