Re: [PHP] Converting Hex to RGB

2004-06-09 Thread Ashwin Purohit
Chris, I think that maybe the function imagecreatetruecolor() is the problem; I'll try just imagecreate instead when I get home. Thanks, Ashwin Purohit. _ MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months FREE! ht

Re: [PHP] Converting Hex to RGB

2004-06-08 Thread Chris
I'm not sure why it isn't setting the background color properly. Is everything else working ok? That *looks* like it should work, though I haven't ever needed to set a background color for any of my PHP/GD images before... Chris Ashwin Purohit wrote: Sorry Please view the script here (I didn't

Re: [PHP] Converting Hex to RGB

2004-06-08 Thread Ashwin Purohit
Sorry Please view the script here (I didn't know it would convert to HTML): http://www.thegarlic.homeip.net/graphics/button.txt Thanks. _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.

Re: [PHP] Converting Hex to RGB

2004-06-08 Thread Ashwin Purohit
I tried to make this image creation tool, but for some reason the background color is not changing, even if I input new hex color codes into it (I tried 'substringing' them), the background always shows up black. The funny thing is, at the end of the script, it shows the correct RGB values extra

Re: [PHP] Converting Hex to RGB

2004-06-08 Thread Chris
It's fairly simple... the hex color code is just: #RRGGBB So use the string functions to separate out each color (probably substr) then use hexdec to convert it into a decimal number. Chris Ashwin Purohit wrote: Hello Everyone, I would like to know if there is some way to write a script so that I