# Adding a color effect strip to the video sequencer using Python without the operator?

I'm trying to run this code headless to avoid the context error however I can't find any information about adding a color strip without using bpy.ops. How can I convert the following code to not use the operator please?

bpy.ops.sequencer.effect_strip_add(
type='COLOR',
frame_start=1,
frame_end=int(file) * filesCount,
channel=1,
color=(
backgroundColor['r'] / 255,
backgroundColor['g'] / 255,
backgroundColor['b'] / 255
)
)


I think it has something to do with new_effect however I can't see an option to add rgb values.

• blender.stackexchange.com/a/101129/15543 May 26, 2021 at 16:46
• You beat me to it @batFINGER! Thanks so much! Your solution works perfectly. I really appreciate your help again :)
– Raja
May 26, 2021 at 16:48