Re: Calling all PHP gurus
by "Thomas R. Powell" <tompow(at)n2.net>
|
Date: |
Wed, 06 Sep 2000 06:57:20 -0700 |
To: |
"Gibson, Timmi" <TimmiG(at)verbatim.com.au> |
Cc: |
hwg-languages(at)hwg.org |
In-Reply-To: |
|
|
todo: View
Thread,
Original
|
|
Timmi,
I used JavaScript to generate this browser safe color table,
http://www.earthonly.com/color
You may want to adopt the concept for your PHP project. This script does
not use math to calculate the hex codes. It loops through the 6 hex
doublets to form the table array.
Good luck.
Tom
At 02:16 PM 09/06/2000 +1000, you wrote:
>I'm hoping someone out there can help me with this one cause I'm really
>stuck
>
>I want to generate an HTML table or series of tables using PHP in which each
>table cell will have its background colour set to one of the 216 web safe
>colours ie i want to make a table or series of tables that shows all the
>websafe colours.
>
>I understand the relationship between RGB values and hex values and I know
>the RGB values increment by 51. I guess i'm stuck on working how to do the
>maths that will increment the values change it into hex and then loop to
>generate the table. I do understand how to generate the table itself but not
>how to write the loop that will set the background colour variable. Any
>hints and pushes in the right direction would really help! I'm afraid my
>maths sucks and that is what is stopping me here.
>
>Please reply to me directly as well as off the list as I only get the
>digest.
>
>Thanks heaps in advance
>
>Timmi Gibson
>Marketing Assistant
>Verbatim Australia
>Ph: (03) 9823 0905
>Fax: (03) 9824 7011
>Web: http://www.verbatim.com.au
>
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA