def on_color(clip, size=None, color=(0, 0, 0), pos=None, col_opacity=None):
 if (size is None):
  size = clip.size
 if (pos is None):
  pos = 'center'
 colorclip = ColorClip(size, color)
 if col_opacity:
  colorclip = colorclip.with_mask().set_opacity(col_opacity)
 return CompositeVideoClip([colorclip, clip.set_pos(pos)], transparent=(col_opacity is not None))

def on_color ( clip , size = None , color = ( 0 , 0 , 0 ) , pos = None , col_opacity = None ) : if ( size is None ) : size = clip . size if ( pos is None ) : pos = 'center' colorclip = ColorClip ( size , color ) if col_opacity : colorclip = colorclip . with_mask ( ) . set_opacity ( col_opacity ) return CompositeVideoClip ( [ colorclip , clip . set_pos ( pos ) ] , transparent = ( col_opacity is not None ) )
returns a clip made of the current clip overlaid on a color clip of a possibly bigger size .