How to flash background colors

If you don't know how to set background and text colors, then i suggest you read my page about HTML 3.0 colors first. This is a little technique that I picked up from the home page at The Underground. It's quite simple- you do a standard <BODY BGCOLOR="XXXXXX">, except that you do it many times, and change the color each time, causing Netscape to continuously redraw the background. Here's an example:

<HTML>
<HEAD>
<TITLE>Changing background colors</TITLE>
</HEAD>

<body bgcolor="000000">
<body bgcolor="200000">
<body bgcolor="400000">
<body bgcolor="600000">
<body bgcolor="800000">
<body bgcolor="A00000">
<body bgcolor="C00000">
<body bgcolor="E00000">
<body bgcolor="F00000">
<body bgcolor="FF0000">

etc....

Which shades quickly in to a deep red. The unfortunate drawback is that you have to do it before any text is drawn- you can't reset the background or text colors once you've started the body.

The result of this technique is machine-dependant. The colors flash as quickly as the machine can draw them. So machines set to a high bit depth like19 million colors, or those that have large windows, display the colors more smoothly. A fast machine in 256 color mode will display the colors so rapidly you can barely see them.




Evan's Home Page Evan's HotLinks Page Cool HTML Stuff




Flashing Colors Page / Evan Dorn/ evan@sccs.swarthmore.edu
Last Updated 6/22/95