# Coloring the cancellation line with \cancel

I would like the strike-out line colored grey when using the \cancel command from the cancel package.

The code...

\documentclass{article}

\usepackage{cancel}

\begin{document}

$$a+\cancel b+c$$

\end{document}


... gives this output:

Can this cancellation line be made weaker in the colour, for example grey, while the math itself remains black?

• Please don't use $$...$$, that's deprecated in LaTeX. Use $...$ instead
– user31729
Jul 28, 2017 at 18:26
• @ChristianHupfer I see... Why on Earth would that easy, fool-proof notation form be made appreciated? Jul 28, 2017 at 18:35
• Which one? $$...$$ isn't fool - proof for LaTeX parsing ;-)
– user31729
Jul 28, 2017 at 18:39
• @ChristianHupfer A bit more accessible for the mortals among us, I will claim. Anyhow, thank you for the answer. Jul 28, 2017 at 20:13

Using \renewcommand{\CancelColor}{\color{whatevercoloryoulike}} should help!

I suggest to use the thicklines option to the package as well:

\documentclass{article}

\usepackage{xcolor}
\usepackage[thicklines]{cancel}

\renewcommand{\CancelColor}{\color{lightgray}}

\begin{document}

$a+\cancel{b}+c$

\end{document}