@classmethod
def _get_value_background(cls, config):
    """
        Return the calculated background color based on the "value" key.

        :param config: the config dict
        :return: color string
        """
    try:
        this = config['thresholds'][config['label']]
        order = this.get('order', 'auto')
        if order != 'strict':
            caster = cls._get_caster_func(order, this)
            if caster:
                thresholds = sorted(list(this['colors'].keys()), key=lambda
                    v: caster(v))
                last = thresholds[0]
                for threshold in thresholds:
                    if caster(config['value']) <= caster(threshold):
                        if this.get('shade', None):
                            fraction = cls._get_fraction(last, threshold,
                                caster(config['value']))
                            return cls._shade(fraction, this['colors'][last
                                ], this['colors'][threshold])
                        return this['colors'][threshold]
                    last = threshold
                return this['above']
        return this['colors'][config['value']]
    except KeyError:
        pass
    try:
        return config['value_backgrounds'][config['value']]
    except KeyError:
        pass
    return config['value_background']
