color from mysql
#7

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.
Reply


Messages In This Thread
color from mysql - by ajwar - 27.10.2013, 19:54
Re: color from mysql - by Isolated - 27.10.2013, 19:58
Re: color from mysql - by ajwar - 27.10.2013, 20:02
Re: color from mysql - by Hamam - 27.10.2013, 20:05
Re: color from mysql - by ajwar - 27.10.2013, 20:07
Re: color from mysql - by Jefff - 27.10.2013, 20:53
Re: color from mysql - by Vince - 27.10.2013, 23:37

Forum Jump:


Users browsing this thread: 3 Guest(s)