Since I wanted a better readability of highlights of a would be black & white-printed document, I needed to change both the highlighting color (gray) AND the font color (white).
Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}}
does not work, compiling returns Package xcolor Error: Undefined color '{white}'.
Here's the mwe:
\documentclass{article}
\usepackage{xcolor}
\usepackage{color}
\usepackage{soul} % Enables highlighting
\sethlcolor{gray}
\begin{document}
\textcolor{white}{\hl{Success}}
%% Error:
%% Package xcolor Error: Undefined color `{white}'.
\hl{\textcolor{white}{Fail}}
\end{document}
So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens.