+ // first see if the name is already there
+ wxString cName = name;
+ cName.MakeUpper();
+ wxString cName2 = cName;
+ if ( !cName2.Replace("GRAY", "GREY") )
+ cName2.clear();
+
+ wxNode *node = self->First();
+ while ( node ) {
+ const wxChar *key = node->GetKeyString();
+ if ( cName == key || cName2 == key ) {
+ wxColour* c = (wxColour *)node->Data();
+ c->Set(red, green, blue);
+ return;
+ }
+ node = node->Next();
+ }
+
+ // otherwise append the new colour