You can do that in the SDKs, that is a primary thing the SDK can do.
For example in Javascript, you would write something like this: Trait userTrait = await bulletClient.SetTrait("my_user_id", "my_user_trait", "blue");