If I want to change a given color to a desired color in an image, I can call imagemagick via the following command
convert input.png -fill <desired_color> -fuzz 10% -opaque <original_color> output.png
This replaces the original_color (with 10% fuzz) with the desired_color (which can be passed very precisely via their RGB values).
Is there a command line tool which can do this for a video file?