Filling shapes with uniform colour gets boring after a while. To spice things up, we can use linear gradients.
A linear gradient introduced via
is a "smooth" colour transition, with lines of constant colour
going perpendicular to the line segment joining the point (x1, y1)
[ColorStop = 0]
to the point (x2, y2)
[ColorStop = 1].
Precise colours can be specified in the interval [0,1] via
the addColorStop()
method. To have a colour gradient,
one needs to specify at least two such ColorStops.
[The following table has been adapted from Wikipedia.]
|
|
|
Keep your personal notes here. These notes are stored by your browser on your own computer, and will be available from any page on this site. You can choose to use html syntax for formatting.