My question is based on the example which may be found here in teh second answer. Actually, I discovered this feature of unicode-math some time ago, but suspected that I am doing something wrong.
Setting the color of the math font using \setmathfont changes the color of all letters and symbols but not of the horizontal lines in fracions, square roots, etc. It is rather unexpected behavior. The question is, whether this is a bug or feature. And, if it is a feature, how to change the color of these elements?
Minimal strangely working example:
\documentclass{article}
\usepackage{fontspec}
\setmainfont[Color=000000]{XITS}
\usepackage{unicode-math}
\setmathfont[Color=FF0000]{XITS Math}
\begin{document}
A bunch of text, then an equation.
\[
N^2 = -\frac{g}{\rho_0} \frac{\partial \rho}{\partial z} ,\;\;\;\;
N = \sqrt{-\frac{g}{\rho_0} \frac{\partial \rho}{\partial z}}
\]
\end{document}
Produces the following result for me:

setfontcommand if it can not be used in real life? It seems a bit irrational. – Misha Jul 28 '12 at 03:44