[Tex/LaTex] Equivalent color for \colorbox{gray} as for \cellcolor[gray]{0.8}

colortables

In my table I have used \cellcolor[gray]{0.8} and I would like to mark some words in my text with the same color. I have tried \colorbox{gray}, but the resulting box in the text is too dark. How can I get the same grey-color as in the table?

Best Answer

The arguments to \cellcolor are just passed to \color internally so that it colours the panel of the specified colour so

\cellcolor[gray]{0.8}

just calls

\color[gray]{0.8}

and you may use that directly.