def add_bgcolor(self, colname, cmap='copper', mode='absmax',
            threshold=2):
        try:
            cmap = cmap_builder(cmap)
        except:
            pass
        data = self.df[colname].values
        if len(data) == 0:
            return
        if mode == 'clip':
            data = [min(x, threshold)/float(threshold) for x in data]
        elif mode == 'absmax':
            m = abs(data.min())
            M = abs(data.max())
            M = max([m, M])
            if M != 0:
                data = (data / M + 1)/2.
        elif mode == 'max':
            if data.max() != 0:
                data = data / float(data.max())
        rgbcolors = [cmap(x)[0:3] for x in data]
        hexcolors = [rgb2hex(*x, normalised=True) for x in rgbcolors]
        data = self.df[colname].values
        def prec(x):
            try:
                x = easydev.precision(x, self.pd_options['precision'])
                return x
            except:
                return x
        data = [prec(x) for x in data]
        html_formatter = '<p style="background-color:{0}">{1}</p>'
        self.df[colname] = [html_formatter.format(x, y)
                for x, y in zip(hexcolors, data)]