On this page
Filling
Last updated on
30 April 2025
Image filling takes a transparent image, fills the BG.
You are providing a FOREGROUND image and a BACKGROUND color. This foreground image can have variable transparencies, gradients, scanlines, waves, swirls, blankness to generate a colorful, effective image.
Solids
'fill' = array(
array(
'type' => 'solid',
'x' => X,
'y' => Y,
'width' => WIDTH,
'height' => HEIGHT,
'colors' => array(COLOR),
),
array(
'type' => 'solid',
'x' => X,
'y' => Y,
'width' => WIDTH,
'height' => HEIGHT,
'colors' => array(COLOR),
),
);
Gradients
Currently, the stock gradient is a simple, top-down (vertical) fashion. Currently, this is a 'y-gradient'
'fill' = array(
array(
'type' => 'y-gradient',
'x' => X,
'y' => Y,
'width' => WIDTH,
'height' => HEIGHT,
'colors' => array(TOPCOLOR, BOTTOMCOLOR),
),
array(
'type' => 'y-gradient',
'x' => X,
'y' => Y,
'width' => WIDTH,
'height' => HEIGHT,
'colors' => array(TOPCOLOR, BOTTOMCOLOR),
),
);
In both examples, the color is fieldname corresponding to the color in the scheme.
Here is how color.module handles "Fills" (Which can be gradients or solids, or anything else someone extends it to be)
Examples
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion