Background Color

bg

Sets the color that fade and gradient-mask fade the picture into. bg accepts any Imgix color: RGB, ARGB, RRGGBB, AARRGGBB, or a CSS color name.

On video, a translucent bg lets the picture show through. Without bg, the default depends on the output, so a still matches its Imgix image:

OutputFades into
Video: MP4/WebM, HLS/DASH, and animated GIF/WebP/AVIF/JXL/APNGBlack
Opaque still: jpg, pjpg, jp2, jxr, a single-frame gif, and any video-generate=thumbnail without an alpha formatWhite. A translucent bg is made opaque.
Still with alpha: png, png8, png32, webp, jxl, avifTransparent: the faded picture becomes see-through, and a bg keeps its own alpha.

Set bg explicitly when a still (such as a poster thumbnail) and its video must match.

bg doesn’t color the fit=fill background; use fill-color for that.