code: def set_colour(self, r, g, b):
          
          if not 0 <= r <= 255:
              raise ValueError("The value for red needs to be between 0 and 255.")
          if not 0 <= g <= 255:
              raise ValueError("The value for green needs to be between 0 and 255.")
          if not 0 <= b <= 255:
              raise ValueError("The value for blue needs to be between 0 and 255.")
  
          #print(BulbDevice)
          hexvalue = BulbDevice._rgb_to_hexvalue(r, g, b)
  
          payload = self.generate_payload(SET, {
              self.DPS_INDEX_MODE: self.DPS_MODE_COLOUR,
              self.DPS_INDEX_COLOUR: hexvalue})
          data = self._send_receive(payload)
          return data
docs: Set colour of an rgb bulb.
  
          Args:
              r(int): Value for the colour red as int from 0-255.
              g(int): Value for the colour green as int from 0-255.
              b(int): Value for the colour blue as int from 0-255.