Try this
void clif_display_message_color(struct map_session_data *sd, const char* msg, unsigned long color)
{
int fd;
unsigned short len = strlen(msg) + 1;
nullpo_retv(sd);
fd = sd->fd;
WFIFOHEAD(fd, len+12);
WFIFOW(fd,0) = 0x2C1;
WFIFOW(fd,2) = len+12;
WFIFOL(fd,4) = 0;
WFIFOL(fd,8) = color;
memcpy(WFIFOP(fd,12), msg, len);
WFIFOSET(fd, WFIFOW(fd,2));
}