How to change the color of my name?
As you suspected, you accomplish this the same way as changing text in the chat box.
For completeness, the code to do that is:
<c######>name</c>
Replace the ######
with the hex code color you wish to use.
Unfortunately, unlike the chatbox, you are very limited on the length of characters you can use.
There are a few basic colors that only require a single digit:
2 Red
3 Green
4 Blue
5 Turquoise
6 Pink
7 Yellow
9 Dark Red
If you want to use one of these colors, it will save you quite a bit of space to spend those characters on your actual name.
In case you have doubts, you can see that the name change is going to go through correctly before you confirm the change. Here is a screenshot of my game which shows the change to blue:
And again on the confirmation screen: