Generally modifiers, or modifying phrases, come right after or right before the word they modify.
Adding the comma makes things clearer and makes the sentence seem a bit less like a "run-on" sentence, though in speech you probably won't hear a distinct pause between "blue" and "which."
This paper will turn red rather than blue, which is her favorite colour.
So "blue" is her favorite color, because "which is her favorite color" comes right after "blue."
Something similar you might hear/read:
This paper will turn red rather than her favorite color, blue
To say red is her favorite color:
This paper will turn red, which is her favorite colour, rather than blue.
Omitting the commas here would definitely be awkward.
Putting comma right before rather?
This paper will turn red, rather than blue which is her favorite color
Nope, this doesn't really change the meaning of it. It just slightly more emphasizes the fact that the paper will turn red - emphasizing "This paper will turn red" as the main idea in the sentence.