Thread: rgbtohex help ~
View Single Post
  #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