Trait Doctoring’s effect changes only the text printed on the permanent. It can’t change words found in abilities it’s been granted. For example, if you’ve changed “green” to “blue,” and the permanent gains protection from green (as opposed to having protection from green printed on it), that protection ability is unaffected. The permanent will have protection from green.