BlogDiagrams
Generictcolortable

Description

The code above is a LaTeX document that creates a table using the tabularx package and places it in a tcolorbox. The table has three columns and six rows with alternating background colors using the \rowcolors command. The text in the table is set in sans-serif font using the \sffamily command, and the headers for each column are in boldface text. The table cells are filled with placeholder text, which can be replaced with actual data. The background color of the headers is orange with 40% transparency, and the text color is black. The tcolorbox is enhanced with the enhanced option and has no title, and the upper part of the box is clipped with the clip upper option.

Keywords

tikz, table, border, array, tabularx, tcolorbox, rowcolors, enhanced, notitle, clip upper, fontupper, cellcolor, color, textbf.

Source Code

BlogDiagrams

\documentclass[tikz,table,border=2mm]{standalone}
% \usepackage{PTSansNarrow}
% \usepackage[T1]{fontenc}
\usepackage{array,tabularx}
\usepackage[most]{tcolorbox}
 
\begin{document}
 
\rowcolors{1}{blue!15}{white}
\begin{tcolorbox}[enhanced, notitle, clip upper, fontupper=\sffamily,%
    tabularx={>{\centering\arraybackslash}X%
              >{\centering\arraybackslash}X%
              >{\centering\arraybackslash}X}]
  \cellcolor{orange!40} \color{black} \textbf{Traditional} &\cellcolor{orange!40}\color{black} \textbf{Chosen} &\cellcolor{orange!40}\color{black} \textbf{Other} \\
 cell1  & cell2  & cell3  \\ 
 cell4  & cell5  & cell6  \\ 
 cell7  & cell8  & cell9  \\ 
 cell10 & cell11 & cell12 \\ 
 cell13 & cell14 & cell15  \\ 
 cell16 & cell17 & cell18 \\ 
\end{tcolorbox}
\end{document}
Deploy to Overleaf