(self, attr, red, green, blue)
Set palette entry for attribute (0--16).
Set palette entry for attribute (0--16).
Set palette entry for attribute ( 0 -- 16 ) .
def set_palette_entry(self, attr, red, green, blue):
        """Set palette entry for attribute (0--16)."""
        # keep a record, mainly for cursor colours
        self._palette[attr] = red, green, blue
        # set the ANSI palette
        ansi_attr = 8*(attr//8) + EGA_TO_ANSI[attr%8]
        self._emit_ti('initc', ansi_attr, (red*1000)//255, (green*1000)//255, (blue*1000)//255)
def set_palette_entry ( self , attr , red , green , blue ) : # keep a record, mainly for cursor colours self . _palette [ attr ] = red , green , blue # set the ANSI palette ansi_attr = 8 * ( attr // 8 ) + EGA_TO_ANSI [ attr % 8 ] self . _emit_ti ( 'initc' , ansi_attr , ( red * 1000 ) // 255 , ( green * 1000 ) // 255 , ( blue * 1000 ) // 255 )