code: def to_css(self):
          ''' Generate the CSS representation of this RGB color.
  
          Returns:
              str, ``"rgb(...)"`` or ``"rgba(...)"``
  
          '''
          if self.a == 1.0:
              return "rgb(%d, %d, %d)" % (self.r, self.g, self.b)
          else:
              return "rgba(%d, %d, %d, %s)" % (self.r, self.g, self.b, self.af to_css(self):
          ''' Generate the CSS representation of this RGB color.
  
          Returns:
              str, ``"rgb(...)"`` or ``"rgba(...)"``
  
          '''
          if self.a == 1.0:
              return "rgb(%d, %d, %d)" % (self.r, self.g, self.b)
          else:
              return "rgba(%d, %d, %d, %s)" % (self.r, self.g, self.b, self.a)
docs: Generate the CSS representation of this RGB color.
  
          Returns:
              str, ``"rgb(...)"`` or ``"rgba(...)"``