Avoid to have a color window of 0

we set a minimal value using the folowing heuristic:

double levelMin = r[0] - 0.5*window;
double levelMax = r[1] + 0.5*window;

s = std::min(0.1, (levelMax-levelMin) / 1000);