Custom colour prefix support?

How difficult would it be to add support for custom colour prefix/suffix/name.

Similar to how leather armour has (theoretically) sixteen million possibilities, could the same option be applied to chat names, suffix/prefix and aliases in a similar way using hex codes or r,g,b values?

This might be better/easier as a plugin/mod.

With a vanilla client, it’s impossible, you must use a mod.