Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   rgbtohex help ~ (https://forums.graalonline.com/forums/showthread.php?t=134257670)

oo_jazz_oo 01-16-2010 05:38 AM

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?

fowlplay4 01-16-2010 05:53 AM

Here's his functions: Tig's Hex Conversion

All else fails, write your own! :)

oo_jazz_oo 01-16-2010 06:16 AM

Tyty. His worked perfectly fine. :)

The shared function should still be fixed though. XD


All times are GMT +2. The time now is 06:30 AM.

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