Translation:The gate is not green, but blue.
The goal is not green, not even a bit, not even with some limitations, but it is totally blue. To express this contradictory statement (it is blue) after a negated statement (it is not green), you need to use sondern.
You would use aber in the following example, where the second statement is not totally contradictory, but it limits the amount of green colour on the gate:
The gate is not green, but it has some green stripes. = Das Tor ist nicht grün, aber es hat ein paar grüne Streifen.
sondern is used after a negated statement in order to highlight an improvement, correction or another contradictory statement.
aber expresses a limitation, a reservation, a correct, amend to a statement which does not completely fit the expectation.
No--I don't think that works in German. "Aber", as a conjunction, would need to connect to a whole sentence here "... aber blau ist meine Lieblingsfarbe." It's a good example of how some meanings of a word (in the case, the English "but") may map to a word in another language, but not usually all meanings/uses.
"sondern" is correct.
In some cases, yes. If you look up a word like "but" in the dictionary, it will have a bunch of meanings. "But" maps pretty closely to "aber", but they don't share every meaning or function (that would be highly unlikely!)
For instance: "But why?" = "Aber warum?" "I sing, but/however he doesn't" = "Ich singe, aber er singt nicht." But with this construction: "It's not red, but (rather) blue." = "Es ist nicht rot, sondern blau." "Aber" doesn't have the "but, rather", or "but, instead" meaning. That meaning maps in German to "sondern."
So if you used ¨aber¨ in this sentence, you would use to to make a statement that's at tension with "Das Tor ist nicht grün", like "The goal is not green, but it does look green from a distance" or "The goal is not green, but it is a nice color", but "Sondern" is used to support the assertion that "Das Tor ist nicht grün¨? Is that how those words work?
You are correct that "The goal is not green, BUT it does look green from a distance" and "The goal is not green, BUT it is a nice color", would be "aber". I think that anytime "but" is used in the sense of "not that, but instead this", that's "sondern." So: "Kein Fleisch, sondern Gemuese" (no meat, but instead vegetables), but: "Kein Fleisch, aber Fisch ist ok." (No meat, but fish is ok.)
Sondern means something more like "but rather" or "but instead." As in, it's not this one thing, but instead (/sondern), it's this other one. A couple random examples: --"Ich denk' nich' nach, sondern mach' nur, was ich mag."--"I don't think things over, but instead (I) just do what I like (to do)" (From the rapper "Cro") --"Die Gesunden brauchen keinen Arzt, sondern die Kranken!"--"The healthy (people) don't need a doctor, but rather the sick (people do.)" (Luke, from the Bible) --"Ich bin kein Arzt, sondern Tierarzt"--"I'm not a doctor, (but instead) I'm a veterinarian." --"Der Vogel ist nicht rot, sondern blau."--"The bird's not red, (but rather) it's blue."
Trying to equate a specific word in one language with another in English is tricky, as I'm sure you know! Especially for words which are sort of multi-function, like "but" and "rather."
The dictionary would agree with you but it still sounds rather strange to me (imagine reversing but and rather in that sentence).
Rather : to some degree or extent
—used to introduce a statement that indicates what is true after you have said what is not true
—used to introduce a statement that corrects what you have just said