Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-16-2010, 05:38 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
rgbtohex help ~

I was wondering how exactly the shared.rgbtohex() function works...

I tried to find Tig's original post about the function...but I couldn't find it. (And the forum search brings up about 0 related threads -.-)

Every time I use this function, it returns a hex value that is...just wrong.
No matter what, its always darker...

I've even done a test, where I did shared.hextorgb("#FFFFFF");, then with those values, put it back into shared.rgbtohex, and it returned something totally wrong.

PHP Code:
temp.shared.hextorgb("#FFFFFF");
echo(
shared.rgbtohex(c[0], c[1], c[2])); 
That returns #0F0F0F.

Which is very very wrong.

Even if you put rgbtohex(1, 1, 1); it still returns #0F0F0F.

Is there any way to fix this? Or is this a bug?
Reply With Quote
  #2  
Old 01-16-2010, 05:53 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Here's his functions: Tig's Hex Conversion

All else fails, write your own!
__________________
Quote:
Reply With Quote
  #3  
Old 01-16-2010, 06:16 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Tyty. His worked perfectly fine.

The shared function should still be fixed though. XD
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 +2. The time now is 07:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.