The following minimal example produced the desired results:
\documentclass{article}
\usepackage[usenames]{color}
\begin{document}
black {\color{red} red} black
black
\end{document}
But the following example, which is just the same, other than the fact it is RTL, does not produce the desired results:
\documentclass{article}
\usepackage[usenames]{color}
\usepackage{polyglossia}
\setmainlanguage{hebrew}
\def \hebrewFont{David CLM}
\setmainfont[Mapping=tex-text]{\hebrewFont}
\newfontfamily{\hebrewfont}{\hebrewFont}
\begin{document}
black {\color{red} red} black
black
\end{document}
Am I doing something wrong, or is it a simple bug?
xelatex
outputs bad results on my machine. I also get the warning** WARNING ** Color stack underflow. Just ignore.
.\listfiles
at the beginning of the test document and add that to your question; you may also have outdated packages.