I managed to solve the problem with colors in server-side using C#, some ppl ask me about this in discord, so i'm posting the solution which i used:
first of all u need to create a function for the chat, dont use NAPI.Chat.SendChatMessage cuz u need to send an html code with the color code to the client-side, like this:
public static void SendClientMessage(Client player, String color, String message)
{
NAPI.Chat.SendChatMessageToPlayer(player, "<strong style='color:" + color + "'>" + message + "</strong>");
}
then u need to use this function instead of NAPI.Chat.SendChatMessage
After this u need to remove the brackets and exclamtion from color definitions like this:
public const string CHAT_COLOR_INFO = "#FDFE8B";
With this, the colors should be work fine, but your server should be vulnerable to html injection, so, to solve this problem we will implement the following function in our chat function:
public static string StripHTML(string input)
{
return Regex.Replace(input, "<.*?>", String.Empty);
}
so with this function our chat function will be protected and now should be like this:
public static void SendClientMessage(Client player, String color, String message)
{
StripHTML(message);
NAPI.Chat.SendChatMessageToPlayer(player, "<strong style='color:" + color + "'>" + message + "</strong>");
}
And that's all, if u want u can test with this cmd:
[Command("hi", Alias = "hello, hey, howdy")]
public void SayHi(Client player)
{
SendClientMessage(player, CHAT_COLOR_INFO, "Hello!");
}