def color(self, index):
if self.colors == <NUM_LIT:16>:<EOL><INDENT>if index >= <NUM_LIT:8>:<EOL><INDENT>return self.csi('<STR_LIT>') + self.csi('<STR_LIT>', index - <NUM_LIT:8>)<EOL><DEDENT>else:<EOL><INDENT>return self.csi('<STR_LIT>') + self.csi('<STR_LIT>', index)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return self.csi('<STR_LIT>', index)<EOL><DEDENT>
Get the escape sequence for indexed color ``index``.

        The ``index`` is a color index in the 256 color space. The color space
        consists of:

        * 0x00-0x0f: default EGA colors
        * 0x10-0xe7: 6x6x6 RGB cubes
        * 0xe8-0xff: gray scale ramp