'Highlight a segment.'

def hlstyle(self, fg=None, bg=None, attrs=None):

    if ((not attrs) and (not bg) and (not fg)):
        return u''
    tmux_attrs = []
    if (fg is not None):
        if ((fg is False) or (fg[0] is False)):
            tmux_attrs += [u'fg=default']
        else:
            tmux_attrs += [(u'fg=colour' + str(fg[0]))]
    if (bg is not None):
        if ((bg is False) or (bg[0] is False)):
            tmux_attrs += [u'bg=default']
        else:
            tmux_attrs += [(u'bg=colour' + str(bg[0]))]
    if (attrs is not None):
        tmux_attrs += attrs_to_tmux_attrs(attrs)
    return ((u'#[' + u','.join(tmux_attrs)) + u']')
