Set player colour based on team?

So what I’m basically trying to accomplish is set a players clothing colour based on what team (job) they’re on.

Is this do-able?

Maybe change the cvar clientside? Set their color, then make them die (this makes the colors change) and switch jobs. That should do it. I’m not sure if there is a serverside function that sets them.

I cant write you the code cuz am in school on phone so checkout those resources: wiki.garrysmod.com/page/Classes/Player/SetPlayerColor and wiki.garrysmod.com/page/Libraries/team/GetColor