The way colored text works is simple \u00a7 is used to detect things. As seen in my tutorial there are many things you can do with this such as other characters. It can be used for items, blocks and almost any form of text you can think of. As for the OP I am not sure as to why you have an extra space at the end. Are you sure it is an extra space?