Specify the color to be used for the background of the image.
Values
By default background color is white for output formats not supporting transparency (jpeg
) and a total transparent color for images that supports transparency (png
, webp
and avif
).
For more information on how to specify colors visit the color values section.
Examples
Specify a padding of 40
pixels with padding=40
parameter and without specifying a background color will render an image with a non transparent white background color (using default format=jpeg
):
GET
https://assets.imglab-cdn.net/woman.jpeg?padding=40
Specify a padding of 40
pixels with padding=40
parameter and without specifying a background color will render an image with a total transparent background color (using format=png
):
GET
https://assets.imglab-cdn.net/woman.jpeg?padding=40&format=png
Specify a custom background color with background-color=eee
parameter:
GET
https://assets.imglab-cdn.net/woman.jpeg?padding=40&background-color=eee
Specify a custom semi-transparent background color with background-color=75,75,75,128
and format=png
parameters:
GET
https://assets.imglab-cdn.net/logo.pdf?background-color=75%2C75%2C75%2C128&format=png