Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage[table]{xcolor} % For coloring table cells
- \begin{document}
- \begin{table}[h!]
- \centering
- \begin{tabular}{|c|c|c|}
- \hline
- \rowcolor{lightgray} % Entire row color
- Header 1 & Header 2 & Header 3 \\
- \hline
- Cell 1 & \cellcolor{yellow} Cell 2 & Cell 3 \\ % Single cell color
- \hline
- \cellcolor{red!50} Cell 4 & Cell 5 & \cellcolor{blue!30} Cell 6 \\ % Transparent colors
- \hline
- \end{tabular}
- \caption{A table with colored cells.}
- \end{table}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement