The input bar code in recent Windows builds of XChat appears to strip out leading zeros in colour codes (e.g. "^C05" is replaced with "^C5"), which corrupts a colour code if it's immediately followed by a number.
Steps to reproduce:
1. Set the foreground colour to e.g. 5.
2. Type "1".
3. Press Enter.