code: def set_text_color(self, r,g=-1,b=-1):
          "Set color for text"
          if((r==0 and g==0 and b==0) or g==-1):
              self.text_color=sprintf('%.3f g',r/255.0)
          else:
              self.text_color=sprintf('%.3f %.3f %.3f rg',r/255.0,g/255.0,b/255.0)
          self.color_flag=(self.fill_color!=self.text_colorf set_text_color(self, r,g=-1,b=-1):
          "Set color for text"
          if((r==0 and g==0 and b==0) or g==-1):
              self.text_color=sprintf('%.3f g',r/255.0)
          else:
              self.text_color=sprintf('%.3f %.3f %.3f rg',r/255.0,g/255.0,b/255.0)
          self.color_flag=(self.fill_color!=self.text_color)
docs: Set color for text