Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2006, 09:07 AM
Dymerius
Sarnak
 
Join Date: Oct 2004
Posts: 74
Default 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,
Reply With Quote
  #2  
Old 08-17-2006, 03:29 AM
EmanonCow
Sarnak
 
Join Date: Aug 2006
Posts: 35
Default

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.)
Reply With Quote
  #3  
Old 08-21-2006, 02:02 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,474
Default

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
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #4  
Old 08-24-2006, 01:27 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3