#NEWLINE# @ staticmethod #NEWLINE# def set_custom_color( index , color ) : #NEWLINE# #INDENT# ' Set the custom color for the given index.\n\n        The custom colors are shared among all color dialogs.\n\n        Parameters\n        ----------\n        index : int\n            The integer index of the custom color.\n\n        color : Color\n            The custom color to set for the index\n\n        Notes\n        -----\n        The Application object must exist before calling this method.\n\n        ' #NEWLINE# app = Application . instance ( ) #NEWLINE# assert ( app is not None ) , 'the application object does not exist' #NEWLINE# proxy_cls = app . resolve_proxy_class ( ColorDialog ) #NEWLINE# if ( proxy_cls is not None ) : #NEWLINE# #INDENT# proxy_cls . set_custom_color ( index , color )