This script has two parts. The first is class.php. It must be in the same directory as the script to output the gradient. Class php is not used by you and not edited by you. It must be there for the script to work. The other script is what you will edit. This script does not disappear when the gradients are made....it may be renamed to preserve the script before or simply changed to produce a new gradient. When viewing the gradient produced by the php script upload/transload to your webspace changing the extension to JPG.

Gradient Background

Gradients can be created with as many colors as you want and any size. In the gradient-1.php script we have a simple three color blended background.

The three gradient lines are your colors.....The first three numbers the RBG color. and the last number is the percentage each color has of the width...no matter what the width is...In this case the center color is 50% of the width fading to 0 and fading to 100 with the colors on each side. The display line is the size. Here's what the above makes:

Tubular Gradients

To make tubular gradients the first and last color should be the same as the bgcolor it will be used on...In this case we'll use black.

NOTE: Color numbers below use Hex. It is just another way to define colors. Most people are more familiar with Hex and so it can save time. 0xNumbers 1&2; 0xNumbers 3&4, and 0xNumbers 5&6. Both ways will work inside the script simultaneously.