(self, min_value, max_value, config_heading, custom_map=None)
return ColourRange(min_value, max_value, colour_map)
Get the colour range for the chosen config heading,
        or revert back to the default one if it is invalid.
Get the colour range for the chosen config heading,
        or revert back to the default one if it is invalid.
Get the colour range for the chosen config heading or revert back to the default one if it is invalid .
def _get_colour_range(self, min_value, max_value, config_heading, custom_map=None):
        """Get the colour range for the chosen config heading,
        or revert back to the default one if it is invalid.
        """
        try:
            colour_map = calculate_colour_map(CONFIG[config_heading]['ColourProfile'])
        except ValueError:
            try:
                colour_map = calculate_colour_map(CONFIG[config_heading]['ColourProfile'].default)
            except ValueError:
                if custom_map is None:
                    raise
                colour_map = calculate_colour_map(custom_map)
        return ColourRange(min_value, max_value, colour_map)
def _get_colour_range ( self , min_value , max_value , config_heading , custom_map = None ) : try : colour_map = calculate_colour_map ( CONFIG [ config_heading ] [ 'ColourProfile' ] ) except ValueError : try : colour_map = calculate_colour_map ( CONFIG [ config_heading ] [ 'ColourProfile' ] . default ) except ValueError : if custom_map is None : raise colour_map = calculate_colour_map ( custom_map ) return ColourRange ( min_value , max_value , colour_map )