Added the from_levels_and_colors function.