def colorize_text(self, text):
        """Adds escape sequences to colorize text and make it
        beautiful. To colorize text, prefix the text you want to color
        with the color (capitalized) wrapped in double angle brackets
        (i.e.: <<GREEN>>). End your string with <<NORMAL>>. If you
        don't, it will be done for you (assuming you used a color code
        in your string."""

        # Take note of where the escape sequences are.
        rnormal = text.rfind('<<NORMAL')
        rany = text.rfind('<<')

        # Put in the escape sequences.
        for color, code in self.colors.items():
            text = text.replace('<<%s>>' % color, code)

        # Make sure that the last sequence is a NORMAL sequence.
        if rany > -1 and rnormal < rany:
            text += self.colors['NORMAL']

        return text