color in the items table
I would like to change the tint of some armor pieces (not dye) and I'm just curious how to manipulate the color field in the items table to get a desired result. All I really know so far is:
1 = Black As the number increases, color goes through dark blue, then I haven't really tested it after about 500. 2147483647(max value) = White I know higher values are... lighter in color... but I really need to understand how this variable works so I don't have to sit here trying every single number combination :p Any suggestions? Thanks in advance, |
It is probably a packed RGB value.
If so, 16777215 will be White as well. Do you know hex numbers? The 6 diget hex number will probably be formatted like this: RRGGBB Each "channel" or component goes from 00 to FF (0 to 255 in decimal). If Red, Green and Blue are from 0 to 255 each: ColourNum = Red * 2^16 + Green * 2^8 + Blue should display the RGB colour combination. (2^16 is "two to the power of 16", or 2*2*2*2*2*2*2*2*2*2*2*2*2*2*2*2.) |
Use this program from my site to get the RGB (F6 copies HEX value)
the use as mentioned before ColourNum = Red * 2^16 + Green * 2^8 + Blue http://66.159.225.58/eqemu/ColorDetector.zip George |
you can put the RGB hex values directly into mysql with 0x:
0xAARRGGBB AA = alpha (transparency) RR = reg GG = green BB = blue in hex. eg: UPDATE items SET color=0xFFFF0000 WHERE id=1001; should turn the cloth cap red. I think you want to have an alpha of FF for solid colors (00 is completely transparent I think)... not sure though. somebody should put this on the wiki. |
All times are GMT -4. The time now is 10:27 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.