AIt just so happens that a character in a certain line of work wears a certain color, and may mention wearing that color because of being what he is. But "is engineer -> wears mustard" is not the logical equivalent of "wearing mustard -> being engineer", or even of "being engineer -> wearing mustard"...
When Data is appointed First Officer in Chain of Command
, he switched away from the yellow Operations uniform to a Red Command uniform for the remainder of that episode.
Likewise, the Doctor switched from blue to red when he activated the ECH subroutine.
LaForge switched to yellow from red when he went to engineering from helm control.
Worf switched from yellow to red when he went from tactical operations to command division at DS9.