<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_rgb_color(self, red, green, blue, effect=EFFECT_SUDDEN, transition_time=MIN_TRANSITION_TIME):
 """ Set the color of the bulb using rgb code. The bulb must be switched on. :param red: Red component of the color between 0 and 255 :param green: Green component of the color between 0 and 255 :param blue: Blue component of the color between 0 and 255 :param effect: if the change is made suddenly or smoothly :param transition_time: in case the change is made smoothly, time in ms that change last :type red: int :type green: int :type blue: int :type effect: str :type transition_time : int """

        # Check bulb state
        if self.is_off():
            raise Exception("set_rgb_color can't be used if the bulb is off. Turn it on first")
        # Input validation
        schema = Schema({'red': All(int, Range(min=0, max=255)),
                         'green': All(int, Range(min=0, max=255)),
                         'blue': All(int, Range(min=0, max=255)),
                         'effect': Any(self.EFFECT_SUDDEN, self.EFFECT_SMOOTH),
                         'transition_time': All(int, Range(min=30))})
        schema({'red': red, 'green': green, 'blue': blue,  'effect': effect, 'transition_time': transition_time})
        # Send command
        rgb = (red*65536) + (green*256) + blue
        params = [rgb, effect, transition_time]
        self.api_call.operate_on_bulb("set_rgb", params)
        # Update property
        self.property[self.PROPERTY_NAME_RGB_COLOR] = rgb