imgix APIsRendering APIMask ImageMask Background Color

Mask Background Color

mask-bg

When mask is set, mask-bg specifies the background color that will appear in the masked areas.

mask-bg works with all values of mask. Valid color values are either a color keyword or 3- (RGB), 4- (ARGB) 6- (RRGGBB) or 8-digit (AARRGGBB) hexadecimal values. The “A” in a 4- or 8-digit hex value represents the color’s alpha transparency. The default is transparent white, 0FFF.

mask-bg can also be used to create multi-layer effects along with bg, which sets the background color for a transparent image like this Illustrator file: