A generalization of the chromatic number