contain-color
Specify the color used to fill letterboxed areas when mode=contain and contain=color are used.
mode=contain
contain=color
If not set contain color will use a fully transparent color by default so it will be affected by the value of background-color parameter.
background-color
For more information on how to specify colors visit the color values section.
In the following example we are not specifying a contain-color value so the default white background-color will apply:
GET https://assets.imglab-cdn.net/woman-03.jpeg?width=1200&height=600&mode=contain x px
https://assets.imglab-cdn.net/woman-03.jpeg?width=1200&height=600&mode=contain
For output formats with transparency support it's possible to set a color with alpha transparency.
In this example we are using a half-transparent color using contain-color=43,73,62,128:
contain-color=43,73,62,128
GET https://assets.imglab-cdn.net/woman-03.jpeg?width=1200&height=600&mode=contain&contain-color=43%2C73%2C62%2C128&format=png x px
https://assets.imglab-cdn.net/woman-03.jpeg?width=1200&height=600&mode=contain&contain-color=43%2C73%2C62%2C128&format=png