Bg-gradient-colors

From Frontal Wiki

Jump to: navigation, search

Contents

Purpose

This style is part of a group of styles used to add gradient backgrounds to visual elements. This particular style sets an array of RGB hexadecimal color values to be used in the gradient.


Value

The bg-gradient-colors style accepts a matrix of hexadecimal color values. You can specify up to 15 colors. For each color, a corresponding value in the alphas and ratios matrices is required. The default value is not set.

bg-gradient-colors: [ color1, color2, ... , color15 ] ;


This style is cascading.


Remarks

Gradient backgrounds are implemented using a feature of Flash. More information may be found in the Flash documentation for Graphics.beginGradientFill.

In order to create a gradient background in frontal, all of the bg-gradient styles must be set:

Moreover, bg-gradient-type must be set for the particular visual element that is to have the gradient background. (All of the other styles are cascading.)


Example

<style>
    document
    {			
		bg-gradient-type: linear;
		bg-gradient-colors: [ 0x00FF00, 0x00FF22, 0x0088FF, 0x5656CC, 0x225599 ];
		bg-gradient-alphas: [ .3, .3, .3, .3, .3 ];
		bg-gradient-ratios: [ 0, 50, 90, 180, 255 ];
		bg-gradient-matrix: [ 1000, 1000, .785, 0, 0 ];
		bg-gradient-spread: pad;
		bg-gradient-interpolation: rgb;
		bg-gradient-focal-point-ratio: 0;
    }
</style>
<text style="font-family: Swift LT Std; font-size: 96px; margin: auto;"><![CDATA[Hello, world.]]></text>


Can Be Applied To

This style can be applied to all visual elements in particular:

Personal tools
Get Adobe Flash player