27.10.2013, 23:37
Save the colors as integers to begin with. Don't try to handle them as strings, because they're not. In your database, they will appear like -16777046 for red, but that's okay. It's just a different way of writing. For this same reason, you can put -1 as a color for client messages. This translates to 0xFFFFFFFF, i.e. pure white.