'Requires:
nothing
Returns:
nothing (changes the original file)
Logic:
Read one line in at a time. Determine what action to take based on
the state. If the state is before the color table, look for the
beginning of the color table.
If the state is in the color table, create the color dictionary
and print out the tags.
If the state if afer the color table, look for lines with color
info, and substitute the number with the hex number.'

def convert_colors(self):

    self.__initiate_values()
    with open(self.__file, 'r') as read_obj:
        with open(self.__write_to, 'w') as self.__write_obj:
            for line in read_obj:
                self.__line += 1
                self.__token_info = line[:16]
                action = self.__state_dict.get(self.__state)
                if (action is None):
                    try:
                        sys.stderr.write('no    matching    state    in    module    fonts.py\n')
                        sys.stderr.write((self.__state + '\n'))
                    except:
                        pass
                action(line)
    copy_obj = copy.Copy(bug_handler=self.__bug_handler)
    if self.__copy:
        copy_obj.copy_file(self.__write_to, 'color.data')
    copy_obj.rename(self.__write_to, self.__file)
    os.remove(self.__write_to)
