Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm having trouble changing the cellcolor in beamer. I've loaded xcolor alongside beamer, and specified the svgnames and table options;

\documentclass[xcolor=svgnames,smaller,12pt,table]{beamer}

Here's how I try to change the cellcolor in beamer;

\begin{table}[H]
\centering
\caption{Summary of the differences between open and cloed word classes}

\rowcolors{2}{white}{pink!30}
\begin{tabular}{>{\centering\arraybackslash}p{5cm}>{\centering\arraybackslash}p{5cm}}
Open-class & Closed-class\\ 
\hline
\cellcolor[yellow]{0.5}Admit new members & Do not admit new members \\ 
Are numerous & Are few \\ 
Express "content" & Do not express "content" \\ 
Carry stress & Rarely carry stress \\ 
Can be long, e.g. \textit{antidisestablishmentarianism} & Tend to be short, e.g. \textit{the, on} \\
\hline
\end{tabular} 
\end{table}

I get the error message undefined color model. I checked whether yellow is an SVG color and it is. I also defined a color model called yellow, and this didn't work either.

share|improve this question

1 Answer 1

\cellcolor{yellow!50}

is a correct syntax. I suppose you mean a gray color. Then it is

\cellcolor[gray]{0.5}

gray is the color model

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.