My FNZ Studio Version

Business Objects

Latest Update: 04.07.2025 |
Documentation
2024
2023
2022.2
2022.1
11
10
9
8
7
6

1 Linear Gradients

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>/...

1.1 Parameters

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

1.2 Examples

1.2.1 CSS Gradient Images Usage

.myBackground { 
    background-image:          url(/gradient/linear/v/20/0/255,255,255/20/0,0,0/image.png);
    background-repeat: repeat-x; 
}

1.2.2 Horizontal Two Colors

/gradient/linear/h/200/0/red/200/black/image.png

GradientImages1.png
Figure 1 : Horizontal two colors

1.2.3 Vertical Two Colors

/gradient/linear/v/20/0/255,255,255/20/0,0,0/image.png

GradientImages2.png
Figure 2 : vertical two colors

1.2.4 Vertical Multiple Colors

{CONTEXT_PATH/gradient/linear/h/400/0/FF0000/50/FFFF00/100/00FF00/150/0000FF/image.png

GradientImages3.png
Figure 3 : Horizontal multiple colors

1.3 Remarks

  • 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.
© 2026 Appway AG. All Rights Reserved