def _prepare_transition(self, is_on=None, brightness=None, color=None):
dest_state = super()._prepare_transition(is_on,<EOL>brightness=brightness,<EOL>color=color)<EOL>if is_on and not self.is_on and color is not None:<EOL><INDENT>self.set(color=color, cancel_transition=False)<EOL><DEDENT>return dest_state<EOL>
Perform pre-transition tasks and construct the destination state.

:param is_on: The on-off state to transition to.
:param brightness: The brightness to transition to (0.0-1.0).
:param color: The color to transition to.
:return: The destination state of the transition.