'Check the to see if it contains color info. If it does, extract the
number and look up the hex value in the color dictionary. If the color
dictionary has no key for the number, print out an error message.
Otherwise, print out the line.
Added Oct 10, 2003
If the number is 0, that indicates no color'

def __after_color_func(self, line):

    if (self.__token_info == 'cw<ci<font-color'):
        hex_num = int(line[20:(-1)])
        hex_num = self.__figure_num(hex_num)
        if hex_num:
            self.__write_obj.write(('cw<ci<font-color<nu<%s\n' % hex_num))
    elif (line[0:5] == 'cw<bd'):
        the_index = line.find('bdr-color_')
        if (the_index > (-1)):
            line = re.sub(self.__line_color_exp, self.__sub_from_line_color, line)
        self.__write_obj.write(line)
        "\n                                                if    num    ==    0:\n                                                                hex_num    =    'false'\n                                                else:\n                                                                hex_num    =    self.__color_dict.get(num)\n                                                if    hex_num    ==    None:\n                                                                if    self.__run_level    >    0:\n                                                                                sys.stderr.write(\n                                                                                'module    is    colors.py\n'\n                                                                                'function    is    self.__after_color_func\n'\n                                                                                'no    value    in    self.__color_dict    for    key    %s\n'    %    num\n                                                                                )\n                                                                if    self.__run_level    >    3:\n                                                                                sys.stderr.write(\n                                                                                                'run    level    is    %s\n'\n                                                                                                'Script    will    now    quit\n'\n                                                                                                %    self.__run_level)\n                                                else:\n                                                                self.__write_obj.write(\n                                                                'cw<ci<font-color<nu<%s\n'    %    hex_num\n                                                                )\n                                                "
    else:
        self.__write_obj.write(line)
