Lunar Eclipse Press Release

Menu

Table blending

Question: I need to blend from “purple” to “red” in a table cell, and I need to do it in web safe colors. Can I do that?

Answer: Well, There is only one way to do that without as far as I know, but unfortunately you can’t have your cake and eat it too.

You must create an image and set it as a background image in the table. You can’t get it *all* web safe. Gradients have so many different colors, even when they are just one or two colors. You can start the gradient with two web safe colors, but they probably will be only safe on the ends. I created a gradient for a client and in AOL, normally blues, ended up with neon green running through it.

If you try in PhotoShop to do a normal black and white gradient, then turn it to index colors using *Web* you will see it goes from hundreds of greys to four shades of grey, and then the black and white on the ends.

To be honest, most people with browsers that could even see your background, most likely would have a monitor that would be able to see the gradient with all of its colors. If people are using 16 bit or higher, they should be able to see the gradient without any problems. So unless your users are in the dark ages, you should be able to use a normal .jpg or .gif direct from PhotoShop.

To set a table image as the background, you would have a td tag like this: <TD background=”images\yellow2dot.gif” bgcolor=”#ffffcc”> I usually set the bg color to be similar to the image, so it let’s people know there will be something coming, or perhaps so they can read the text if it would be impossible to read without the image that is to be loaded.

You can just pick two web safe colors, so they can match your background or text perfectly, and just make a gradient with those two colors. 98% of the people should see it just fine….but remember, gradients can be large in file size!

Author: Gina Hutchings
Copyright Lunar Media Inc
Chicago Web Design

Leave a Reply

Your email address will not be published.