made color_model_vardim to use templates