Color Business Object allow you to dynamically generate gradient images without having to upload ready images.
Linear gradient images can be generated on-the-fly. Only linear 1n- or n1-pixel gradient images are supported. The images can be generated by calling the following url:
/gradient/linear/<orientation>/<size>/<pos1>/<color1>/<pos2>/<color2>/.../<posN>/<colorN>/...
| orientation | Orientation of the image, either "v" for vertical or "h" for horizontal. |
| size | Size of the image in pixels. Must be a positive integer. The size gives the width of the image in the dimension defined by the orientation. The other dimension is always 1 (pixel). |
| pos1, pos2, ... | Position of a gradient point in pixels. Must be an integer between 0 and size (inclusive). If the first/last gradient point is not at the start/end of the image, the color of the point is streched to the start/end. |
| color1, color2, ... | Color of a gradient point. Supported color formats:- Decimal: 255,51,153
- Hex: FF3399
- Name: red, blue, green, ...
|
Table 1 : Gradient Parameters
.myBackground {
background-image: url(/gradient/linear/v/20/0/255,255,255/20/0,0,0/image.png);
background-repeat: repeat-x;
}
/gradient/linear/h/200/0/red/200/black/image.png

Figure 1 : Horizontal two colors
/gradient/linear/v/20/0/255,255,255/20/0,0,0/image.png

Figure 2 : vertical two colors
{CONTEXT_PATH/gradient/linear/h/400/0/FF0000/50/FFFF00/100/00FF00/150/0000FF/image.png

Figure 3 : Horizontal multiple colors
- The images generated get cached in the file system under {DATA_HOME}/work/cache/gradient/.png.
- The images are in PNG format.
- Transparency (alpha channel) is not supported.