Creates a multi-point linear gradient color.
The color stops are defined as an array of offsets and colors in the following format:
offset0, color0, offset1, color1, .... offsetN, colorN
The first offset (offset0) should be 0. It represents the starting point of the gradient. The last offset (offsetN) can be any number not greater than 100000. It represents the ending point of the gradient. The other offsets represent the positions of the color stops in between.
For example, the array (in hex):
000000, FF0000, 000080, FFFF00, 000100, 00FF00
means the starting point (000000) is red (FF0000), the mid-point (000080 in hex) is yellow (FFFF00), and the ending point (000100 in hex) is green (00FF00).
One common usage of multi-point gradient colors is to define colors that have metallic look and feel. ChartDirector comes from several predefined gradient color arrays as follows.
Name | Value (in Hex) |
---|
goldGradient | 000000, FFE743, 000060, FFFFE0, 0000B0, FFF0B0, 000100, FFE743 |
silverGradient | 000000, C8C8C8, 000060, F8F8F8, 0000B0, E0E0E0, 000100, C8C8C8 |
redMetalGradient | 000000, E09898, 000060, FFF0F0, 0000B0, F0D8D8, 000100, E09898 |
greenMetalGradient | 000000, 98E098, 000060, F0FFF0, 0000B0, D8F0D8, 000100, 98E098 |
blueMetalGradient | 000000, 9898E0, 000060, F0F0FF, 0000B0, D8D8F0, 000100, 9898E0 |
© 2023 Advanced Software Engineering Limited. All rights reserved.