Possible Duplicate:
Color changes cell height in tabular
The following latex table contains two rows. The rows are identical, except for the greeen color in the first cell in the second row:
\begin{tabularx}{\textwidth}{ |X|X|X|X| }
\hline
\texttt{re.match('go.', 'gob')} & 2 & 3 & 4 \\
\hline
\color{ForestGreen}{\texttt{re.match('go.', 'gob')}} & 2 & 3 & 4 \\
\hline
\end{tabularx}
The color appears to add some padding space above it:

When the color is removed, the spacing is normal again:

Why does cell color affect table spacing?

\color{<color>}{<text>}does but\textcolor{ForestGreen}{\texttt{re.match('go.', 'gob')}}seems to work. – hpesoj626 Oct 22 '12 at 07:44